login_client library

An OAuth2 compliant login client library.

Classes

AuthorizationStrategy
An interface describing a strategy of logging in to the LoginClient.
ClientCredentialsStrategy
An AuthorizationStrategy that uses the Client Credentials Grant.
Credentials
Credentials that prove that a client is allowed to access a resource on the resource owner's behalf.
CredentialsStorage
An interface describing the storage for oauth2.Credentials.
CustomGrantStrategy
An AuthorizationStrategy that authorizes using a custom grant with a customized token field.
InMemoryCredentialsStorage
A CredentialsStorage implementation storing credentials in the memory.
LoginClient
An implementation of an OAuth2 client that also manages storing the obtained credentials and restoring/refreshing them when needed.
OAuthSettings
OAuth2 authorization requests settings.
RawCredentialsStrategy
An AuthorizationStrategy that uses a preexisting oauth2.Credentials to authorize user in.
ResourceOwnerPasswordStrategy
An AuthorizationStrategy that uses the Resource Owner Password Grant.
SmsTokenStrategy
An AuthorizationStrategy that uses a phone number and an SMS token to authorize the resource owner.

Exceptions / Errors

AuthorizationException
An exception raised when OAuth2 authorization fails.
ExpirationException
An exception raised when attempting to use expired OAuth2 credentials.
RefreshException
An exception that occurs when there is some problem with refreshing the credentials.