Class OAuthHelper
- Namespace
- Ant
Runner Lib. Identity
- Assembly
- AntRunnerLib.dll
Gets an OAuth token for a given client ID and tenant ID.
- Inheritance
-
System.
Object OAuthHelper
- Inherited Members
-
System.
Object. Equals(System. Object) System.Object. Equals(System. Object, System. Object) System.Object. Get Hash Code() System.Object. Get Type() System.Object. Memberwise Clone() System.Object. Reference Equals(System. Object, System. Object) System.Object. To String()
Methods
GetToken(String, String, String[], String)
Gets an OAuth token for a given client ID and tenant ID.
public static async Task<string> GetToken(string clientId, string tenantId, string[] scopes, string redirectUri = "http://localhost")
Parameters
clientId
System.String The client ID, a unique identifier assigned to the client application.
tenantId
System.String The tenant ID, which identifies the organization or tenant.
scopes
System.String []The permissions or scopes that the client application is requesting.
redirectUri
System.String The redirect URI where the authorization server will redirect the user after authentication. Default value is "http://localhost".
Returns
- Task<System.
String > The OAuth token as a string.