Method CreateTokenAsync
CreateTokenAsync(TSessionToken, SessionRecord, bool)
Creates a new session token for the session represented by the previous token with the refresh info from the specified session record applied.
Declaration
ValueTask<TSessionToken> CreateTokenAsync(TSessionToken previousToken, SessionRecord session, bool isStale)
Parameters
| Type | Name | Description |
|---|---|---|
| TSessionToken | previousToken | The token the new token is based on. |
| SessionRecord | session | The session record whose refresh info (RefreshedUtc, ValidFor and Generation) must be applied to the new token. |
| bool | isStale | Indicates whether the previous token's information was found to be out of date by GetSessionAsync(TSessionToken). If true, the new token must be built from the latest information in the data store. If false, implementations may reuse the previous token's information and only apply the refresh info (typically synchronously). Reloading the information regardless of this value is always safe, just slower. |
Returns
| Type | Description |
|---|---|
| ValueTask<TSessionToken> |