SessionMinter
Defined in: src/client/session-minter.ts:133
Mints app delegations by asking the Internet Identity canister for one.
Implements
Section titled “Implements”Methods
Section titled “Methods”mint()
Section titled “mint()”mint(
appPublicKey):Promise<DelegationChain>
Defined in: src/client/session-minter.ts:161
Prepares and fetches an app delegation, once more if the fetch finds nothing signed for what the prepare handed out.
The pair is two calls, and only the first of them is an update: an expiration the canister will not sign for is one this session no longer holds, and the answer is to prepare again rather than to sign in again. Attempted a second time and no further — a third would be pursuing something other than the race this covers.
Parameters
Section titled “Parameters”appPublicKey
Section titled “appPublicKey”DerEncodedPublicKey
Returns
Section titled “Returns”Promise<DelegationChain>
Implementation of
Section titled “Implementation of”revoke()
Section titled “revoke()”revoke():
Promise<void>
Defined in: src/client/session-minter.ts:180
Ends the session at the canister.
Idempotent at the canister: a session that is already gone is Ok, because
the caller wanted it gone and it is gone. What comes back as an error is the
canister failing to write, and it is raised rather than dropped — an
application that told a user it signed them out of their apps should be able
to find out that it did not. The call can also fail the way any update call
can, and that rejection is the caller’s to decide about too.
Returns
Section titled “Returns”Promise<void>
create()
Section titled “create()”
staticcreate(options):Promise<SessionMinter>
Defined in: src/client/session-minter.ts:140
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<SessionMinter>