Class OAuthProvider#
Defined in File OAuthProvider.cs
Inheritance Relationships#
Base Type#
public xbe.sdk.EntityBase
(Class EntityBase)
Class Documentation#
- class xbe.sdk.Models.OAuthProvider : xbe.sdk.EntityBase#
Represents an external authentication method that can be used to authenticate new and existing users using supported OAuth protocols.
Public Types
Properties
- bool Pkce { get; set; }#
Indicates whether PKCE is required by the OAuth provider. Optionally, set the value to the desired algorithm of
the PKCE challenge method(e.g.
S256
).
- OAuthProviderProtocol Protocol { get; set; }#
The OAuth protocol version supported by the provider.
- string Name { get; set; }#
The unique name of the provider that can be used for authentication.
- string AuthClass { get; set; }#
The name of the authorization class that will handle OAuth requests for this provider. Default is
oauth.DefaultOAuth2Handler
.
- string AuthorizationURL { get; set; }#
The URL of the provider’s API that will be used to perform authorization requests.
- string ClientID { get; set; }#
The unique identifier that has been provided by the OAuth provider.
- string ClientSecret { get; set; }#
The shared secret that has been provided by the OAuth provider.
- string ProfileURL { get; set; }#
The URL of the provider’s API that the user profile can be retrieved from.
- string Title { get; set; }#
The name of the provider that will be displayed to the user.
- string TokenURL { get; set; }#
The URL of the provider’s API that will perform token exchange.
- Object OtherConfig { get; set; }#
A structure containing additional configuration for the provider required by the authClass.
- Object ProfileMap { get; set; }#
An object that describes how to map the properties of the profile obtained from the provider’s profileURL to the
format that we expect internally.The keys of the map of the name of the properties we expect.The values for
each key is a snippet of JavaScript code that can be executed to compute the desired value.
Example (Discord):
``
{
id: “profile.id”,
alias: “profile.global_name || profile.username”,
avatar: “profile.avatar”,
email: “profile.email”,
locale: “profile.locale”,
username: “profile.username”,
verified: “json.verified”,
}
’’
- string > RedirectURIs { get; set; }#
The list of callback URIs that have been registered with the OAuth provider.
- string > Scope { get; set; }#
The list of scopes to request during the authentication process.
Public Static Functions
- new OAuthProvider Parse (string json)#
Parses the given JSON encoded string into a new NewUser instance.
- Param json:
- Return: