RhinoCommon API
RhinoAccountsManagerUpdateOpenIDConnectTokenAsync Method |
Updates an OpenID Connect token so that it contains the latest user information by contacting the Rhino Account's server userinfo endpoint using a compatible O
Namespace: Rhino.Runtime.RhinoAccounts
Assembly: RhinoCommon (in RhinoCommon.dll)
Since: 7.0
public static Task<IOpenIDConnectToken> UpdateOpenIDConnectTokenAsync( IOpenIDConnectToken currentToken, IOAuth2Token oauth2Token, SecretKey secretKey, CancellationToken cancellationToken )
Public Shared Function UpdateOpenIDConnectTokenAsync ( currentToken As IOpenIDConnectToken, oauth2Token As IOAuth2Token, secretKey As SecretKey, cancellationToken As CancellationToken ) As Task(Of IOpenIDConnectToken)
Parameters
- currentToken
- Type: Rhino.Runtime.RhinoAccountsIOpenIDConnectToken
The existing OpenID Connect token that you wish to updated with the latest user information. - oauth2Token
- Type: Rhino.Runtime.RhinoAccountsIOAuth2Token
A valid OAuth2 token used for authorization. The OAuth2 token must have been issued together with the OpenID Connect token passed or a RhinoAccountsAuthTokenMismatchException will be thrown. - secretKey
- Type: Rhino.Runtime.RhinoAccountsSecretKey
A special key that was handed to you in ExecuteProtectedCodeAsync(FuncSecretKey, Task) - cancellationToken
- Type: System.ThreadingCancellationToken
A token that can be used to signal that the operation should be cancelled.
Return Value
Type: TaskIOpenIDConnectTokenThe updated OpenIDConnectToken based on the original token passed to this method.
| Exception | Condition |
|---|---|
| InvalidOperationException | An invalid secretKey was passed, or the assembly is not allowed to call methods from IRhinoAccountsManager |
| RhinoAccountsException | An error occurred during the authentication process. You may look at the specific subclass of the exception gain more insight as to why the operation failed. |
| OperationCanceledException | The operation was cancelled, either by internal decisions or because the cancellationToken was cancelled. |
If the OpenID Connect token is currently stored in the local cache, it will be updated to reflect the new token.