Skip to content

Commit 15b7ffb

Browse files
committed
refactor: Use Components.js override for account handler
1 parent 5093189 commit 15b7ffb

7 files changed

Lines changed: 19 additions & 231 deletions

File tree

packages/css/config/default.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"css:config/http/static/default.json",
1515
"css:config/identity/access/public.json",
1616
"css:config/identity/email/default.json",
17-
"uma-css:config/identity/handler/default.json",
17+
"css:config/identity/handler/default.json",
1818
"css:config/identity/oidc/default.json",
1919
"css:config/identity/ownership/token.json",
2020
"css:config/identity/pod/static.json",
@@ -76,6 +76,20 @@
7676
}
7777
}
7878
}]
79+
},
80+
{
81+
"comment": "Replace the account store with the UMA version that stores AS settings.",
82+
"@id": "urn:solid-server:override:AccountStore",
83+
"@type": "Override",
84+
"overrideInstance": {
85+
"@id": "urn:solid-server:default:AccountStore"
86+
},
87+
"overrideParameters": {
88+
"@type": "UmaAccountStore",
89+
"storage": {
90+
"@id": "urn:solid-server:default:AccountStorage"
91+
}
92+
}
7993
}
8094
]
8195
}

packages/css/config/identity/handler/base/default.json

Lines changed: 0 additions & 77 deletions
This file was deleted.

packages/css/config/identity/handler/default.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

packages/css/config/identity/handler/storage/account/default.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

packages/css/config/identity/handler/storage/default.json

Lines changed: 0 additions & 113 deletions
This file was deleted.

packages/css/src/identity/interaction/account/util/BaseAccountStore.ts renamed to packages/css/src/identity/interaction/account/util/UmaAccountStore.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

22
import { Initializer, getLoggerFor, createErrorMessage, InternalServerError } from '@solid/community-server';
33
import { AccountLoginStorage, ACCOUNT_TYPE } from './LoginStorage';
4-
import { ACCOUNT_SETTINGS_AS_TOKEN, ACCOUNT_SETTINGS_AUTHZ_SERVER, ACCOUNT_SETTINGS_KEYS,
4+
import { ACCOUNT_SETTINGS_AS_TOKEN, ACCOUNT_SETTINGS_AUTHZ_SERVER, ACCOUNT_SETTINGS_KEYS,
55
ACCOUNT_SETTINGS_REMEMBER_LOGIN, AccountSettings, AccountStore } from './AccountStore';
66
import { ValueType } from '../../../../storage/keyvalue/IndexedStorage';
7-
7+
88
export const ACCOUNT_STORAGE_DESCRIPTION = {
99
[ACCOUNT_SETTINGS_REMEMBER_LOGIN]: 'boolean?',
1010
[ACCOUNT_SETTINGS_AUTHZ_SERVER]: 'string?',
@@ -16,7 +16,7 @@ export const ACCOUNT_STORAGE_DESCRIPTION = {
1616
* A {@link AccountStore} that uses an {@link AccountLoginStorage} to keep track of the accounts.
1717
* Needs to be initialized before it can be used.
1818
*/
19-
export class BaseAccountStore extends Initializer implements AccountStore {
19+
export class UmaAccountStore extends Initializer implements AccountStore {
2020
private readonly logger = getLoggerFor(this);
2121

2222
private readonly storage: AccountLoginStorage<{ [ACCOUNT_TYPE]: typeof ACCOUNT_STORAGE_DESCRIPTION }>;

packages/css/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export * from './http/output/metadata/UmaTicketMetadataWriter';
99
// export * from './identity/configuration/InMemoryJwksKeyHolder';
1010

1111
export * from './identity/interaction/account/util/AccountStore';
12-
export * from './identity/interaction/account/util/BaseAccountStore';
1312
export * from './identity/interaction/account/util/LoginStorage';
13+
export * from './identity/interaction/account/util/UmaAccountStore';
1414

1515
export * from './init/UmaSeededAccountInitializer';
1616

0 commit comments

Comments
 (0)