Click or drag to resize

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
)

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, IOAuth2Token
The auth tokens requested.
Exceptions
ExceptionCondition
InvalidOperationExceptionAn invalid secretKey was passed, or the assembly is not allowed to call methods from IRhinoAccountsManager
RhinoAccountsExceptionAn 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.
OperationCanceledExceptionThe operation was cancelled, either by internal decisions or because the cancellationToken was cancelled.
See Also