RhinoAccountsManagerGetAuthTokensAsync Method (String, String, IEnumerableString, String, NullableInt32, Boolean, IProgressRhinoAccoountsProgressInfo, SecretKey, CancellationToken) |
Asynchronously retrieves auth tokens with the given criteria from the Rhino Accounts server.
Namespace:
Rhino.Runtime.RhinoAccounts
Assembly:
RhinoCommon (in RhinoCommon.dll)
Syntax public static Task<Tuple<IOpenIDConnectToken, IOAuth2Token>> GetAuthTokensAsync(
string clientId,
string clientSecret,
IEnumerable<string> scope,
string prompt,
int? maxAge,
bool showUI,
IProgress<RhinoAccoountsProgressInfo> progress,
SecretKey secretKey,
CancellationToken cancellationToken
)
Public Shared Function GetAuthTokensAsync (
clientId As String,
clientSecret As String,
scope As IEnumerable(Of String),
prompt As String,
maxAge As Integer?,
showUI As Boolean,
progress As IProgress(Of RhinoAccoountsProgressInfo),
secretKey As SecretKey,
cancellationToken As CancellationToken
) As Task(Of Tuple(Of IOpenIDConnectToken, IOAuth2Token))
Parameters
- clientId
- Type: SystemString
The unique id of the client registered in Rhino Accounts. - clientSecret
- Type: SystemString
The secret of the client registered in Rhino Accounts - scope
- Type: System.Collections.GenericIEnumerableString
The scope desired for the tokens. Valid scope values can be found in the Rhino Accounts documentation. - prompt
- Type: SystemString
The prompt of the request. See Rhino Accounts documentation for details. You may pass null if no prompt is desired. - maxAge
- Type: SystemNullableInt32
The maxAge of the request. See Rhino Accounts documentation for details. You may pass null if no maxAge should be enforced. - showUI
- Type: SystemBoolean
true if the user should see a UI showing the progress of the operation and a way to cancel it, or false if the UI should not be displayed.
If false, it is strongly recommended that you pass a progress object and display your own UI to the user. - progress
- Type: SystemIProgressRhinoAccoountsProgressInfo
An object that will report the progress of the operation to the caller. If no progress is needed, you may pass null. - 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:
TaskTupleIOpenIDConnectToken,
IOAuth2TokenThe auth tokens requested.
Exceptions See Also