Class OAuthHelper
- Namespace
- AntRunnerLib.Identity
- Assembly
- AntRunnerLib.dll
Gets an OAuth token for a given client ID and tenant ID.
public class OAuthHelper
- Inheritance
-
System.ObjectOAuthHelper
- Inherited Members
-
System.Object.Equals(System.Object)System.Object.Equals(System.Object, System.Object)System.Object.GetHashCode()System.Object.GetType()System.Object.MemberwiseClone()System.Object.ReferenceEquals(System.Object, System.Object)System.Object.ToString()
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
clientIdSystem.StringThe client ID, a unique identifier assigned to the client application.
tenantIdSystem.StringThe tenant ID, which identifies the organization or tenant.
scopesSystem.String[]The permissions or scopes that the client application is requesting.
redirectUriSystem.StringThe 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.