Class GitHubOidcProvider
Implementation of the OpenID Connect GitHub Provider
Implements
Inherited Members
Namespace: i5.Toolkit.Core.OpenIDConnectClient
Assembly: cs.temp.dll.dll
Syntax
public class GitHubOidcProvider : AbstractOidcProvider, IOidcProvider
Constructors
GitHubOidcProvider()
Creates a new instance of the GitHub client
Declaration
public GitHubOidcProvider()
Methods
GetAccessTokenFromCodeAsync(string, string)
Gets the access token based on a previously retrieved authorization code
Declaration
public override Task<string> GetAccessTokenFromCodeAsync(string code, string redirectUri)
Parameters
Type | Name | Description |
---|---|---|
string | code | The authorization code |
string | redirectUri | The redirect URI which was used during the login |
Returns
Type | Description |
---|---|
Task<><string> | Returns the access token if it could be retrieved; otherwise it returns an empty string |
Overrides
GetUserInfoAsync(string)
Gets information about the logged in user from the GitHub provider
Declaration
public override Task<IUserInfo> GetUserInfoAsync(string accessToken)
Parameters
Type | Name | Description |
---|---|---|
string | accessToken | The access token to authenticate the user |
Returns
Type | Description |
---|---|
Task<><IUserInfo> | Returns information about the logged in user if the request was successful, otherwise null |
Overrides
OpenLoginPage(string[], string)
Opens the GitHUb login page in the system's default Web browser
Declaration
public override void OpenLoginPage(string[] scopes, string redirectUri)
Parameters
Type | Name | Description |
---|---|---|
string[] | scopes | The OpenID Connect scopes that the user must agree to |
string | redirectUri | The URI to which the browser should redirect after the successful login |