MCPcopy
hub / github.com/authts/oidc-client-ts / storeUser

Method storeUser

src/UserManager.ts:799–812  ·  view source on GitHub ↗
(user: User | null)

Source from the content-addressed store, hash-verified

797 }
798
799 public async storeUser(user: User | null): Promise<void> {
800 const logger = this._logger.create("storeUser");
801 if (user) {
802 logger.debug("storing user");
803 const storageString = user.toStorageString();
804 await this.settings.userStore.set(this._userStoreKey, storageString);
805 } else {
806 this._logger.debug("removing user");
807 await this.settings.userStore.remove(this._userStoreKey);
808 if (this.settings.dpop) {
809 await this.settings.dpop.store.remove(this.settings.client_id);
810 }
811 }
812 }
813
814 /**
815 * Removes stale state entries in storage for incomplete authorize requests.

Callers 5

removeUserMethod · 0.95
_useRefreshTokenMethod · 0.95
_buildUserMethod · 0.95
_revokeInternalMethod · 0.95

Calls 5

debugMethod · 0.65
setMethod · 0.65
removeMethod · 0.65
createMethod · 0.45
toStorageStringMethod · 0.45

Tested by

no test coverage detected