GitHubIdpUtils class

Utility functions for the GitHub identity provider.

These functions can be used to compose custom authentication and administration flows if needed.

But for most cases, the methods exposed by GitHubIdp and GitHubIdpAdmin should be sufficient.

Constructors

GitHubIdpUtils({required GitHubIdpConfig config, required AuthUsers authUsers})
Creates a new instance of GitHubIdpUtils.

Properties

config GitHubIdpConfig
Configuration for the GitHub identity provider.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

authenticate(Session session, {required String accessToken, required Transaction? transaction}) Future<GitHubAuthSuccess>
Authenticates a user using an access token.
exchangeCodeForToken(Session session, {required String code, required String codeVerifier, required String redirectUri}) Future<String>
Exchanges an authorization code for an access token.
fetchAccountDetails(Session session, {required String accessToken}) Future<GitHubAccountDetails>
Returns the account details for the given accessToken.
getAccount(Session session) Future<GitHubAccount?>
Returns the possible GitHubAccount associated with a session.
linkGitHubAuthentication(Session session, {required UuidValue authUserId, required GitHubAccountDetails accountDetails, Transaction? transaction}) Future<GitHubAccount>
Adds a GitHub authentication to the given authUserId.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited