package providers
Contains play.silhouette.api.Provider implementations that provide authentication for different schemes and services.
- Alphabetic
- By Inheritance
- providers
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- class BasicAuthProvider extends RequestProvider with PasswordProvider with api.Logger
A request provider implementation which supports HTTP basic authentication.
A request provider implementation which supports HTTP basic authentication.
The provider supports the change of password hashing algorithms on the fly. Sometimes it may be possible to change the hashing algorithm used by the application. But the hashes stored in the backing store can't be converted back into plain text passwords, to hash them again with the new algorithm. So if a user successfully authenticates after the application has changed the hashing algorithm, the provider hashes the entered password again with the new algorithm and stores the auth info in the backing store.
- case class CommonSocialProfile(loginInfo: LoginInfo, firstName: Option[String] = None, lastName: Option[String] = None, fullName: Option[String] = None, email: Option[String] = None, avatarURL: Option[String] = None) extends SocialProfile with Product with Serializable
The social profile contains all the data returned from the social providers after authentication.
The social profile contains all the data returned from the social providers after authentication.
Not every provider returns all the data defined in this class. This is also the representation of the most common profile information provided by the social providers. The data can be used to create a new identity for the first authentication(which is also the registration) or to update an existing identity on every subsequent authentication.
- loginInfo
The linked login info.
- firstName
Maybe the first name of the authenticated user.
- lastName
Maybe the last name of the authenticated user.
- fullName
Maybe the full name of the authenticated user.
Maybe the email of the authenticated provider.
- avatarURL
Maybe the avatar URL of the authenticated provider.
- trait CommonSocialProfileBuilder extends AnyRef
The profile builder for the common social profile.
- class CredentialsProvider extends PasswordProvider
A provider for authenticating with credentials.
A provider for authenticating with credentials.
The provider supports the change of password hashing algorithms on the fly. Sometimes it may be possible to change the hashing algorithm used by the application. But the hashes stored in the backing store can't be converted back into plain text passwords, to hash them again with the new algorithm. So if a user successfully authenticates after the application has changed the hashing algorithm, the provider hashes the entered password again with the new algorithm and stores the auth info in the backing store.
- class DefaultSocialStateHandler extends SocialStateHandler
The base implementation of the SocialStateHandler.
- trait OAuth1Constants extends AnyRef
The OAuth1 constants.
- case class OAuth1Info(token: String, secret: String) extends AuthInfo with Product with Serializable
The OAuth1 details.
The OAuth1 details.
- token
The consumer token.
- secret
The consumer secret.
- trait OAuth1Provider extends SocialProvider with OAuth1Constants with api.Logger
Base implementation for all OAuth1 providers.
- trait OAuth1Service extends AnyRef
The OAuth1 service trait.
- case class OAuth1Settings(requestTokenURL: String, accessTokenURL: String, authorizationURL: String, callbackURL: String, apiURL: Option[String] = None, consumerKey: String, consumerSecret: String) extends Product with Serializable
The OAuth1 settings.
The OAuth1 settings.
- requestTokenURL
The request token URL provided by the OAuth provider.
- accessTokenURL
The access token URL provided by the OAuth provider.
- authorizationURL
The authorization URL provided by the OAuth provider.
- callbackURL
The callback URL to the application after a successful authentication on the OAuth provider. The URL can be a relative path which will be resolved against the current request's host.
- apiURL
The URL to fetch the profile from the API. Can be used to override the default URL hardcoded in every provider implementation.
- consumerKey
The consumer ID provided by the OAuth provider.
- consumerSecret
The consumer secret provided by the OAuth provider.
- trait OAuth1TokenSecret extends AnyRef
The OAuth1 token secret.
The OAuth1 token secret.
This represents the oauth_token_secret returned from the provider with the request token and which is then needed to retrieve the access token. The secret must be stored between two requests and this implementation provides an abstract way to store the secret in different locations.
- trait OAuth1TokenSecretProvider extends AnyRef
Provides the token secret for OAuth1 authentication providers.
- trait OAuth2Constants extends AnyRef
The OAuth2 constants.
- case class OAuth2Info(accessToken: String, tokenType: Option[String] = None, expiresIn: Option[Int] = None, refreshToken: Option[String] = None, params: Option[Map[String, String]] = None) extends AuthInfo with Product with Serializable
The OAuth2 info.
The OAuth2 info.
- accessToken
The access token.
- tokenType
The token type.
- expiresIn
The number of seconds before the token expires.
- refreshToken
The refresh token.
- params
Additional params transported in conjunction with the token.
- trait OAuth2Provider extends SocialStateProvider with OAuth2Constants with api.Logger
Base implementation for all OAuth2 providers.
- case class OAuth2Settings(authorizationURL: Option[String] = None, accessTokenURL: String, redirectURL: Option[String] = None, apiURL: Option[String] = None, clientID: String, clientSecret: String, scope: Option[String] = None, authorizationParams: Map[String, String] = Map.empty, accessTokenParams: Map[String, String] = Map.empty, customProperties: Map[String, String] = Map.empty) extends Product with Serializable
The OAuth2 settings.
The OAuth2 settings.
- authorizationURL
The authorization URL provided by the OAuth provider.
- accessTokenURL
The access token URL provided by the OAuth provider.
- redirectURL
The redirect URL to the application after a successful authentication on the OAuth provider. The URL can be a relative path which will be resolved against the current request's host.
- apiURL
The URL to fetch the profile from the API. Can be used to override the default URL hardcoded in every provider implementation.
- clientID
The client ID provided by the OAuth provider.
- clientSecret
The client secret provided by the OAuth provider.
- scope
The OAuth2 scope parameter provided by the OAuth provider.
- authorizationParams
Additional params to add to the authorization request.
- accessTokenParams
Additional params to add to the access token request.
- customProperties
A map of custom properties for the different providers.
- trait OpenIDConstants extends AnyRef
The OpenID constants.
- case class OpenIDInfo(id: String, attributes: Map[String, String]) extends AuthInfo with Product with Serializable
The OpenID details.
The OpenID details.
- id
The openID.
- attributes
The attributes returned from the provider.
- trait OpenIDProvider extends SocialProvider with OpenIDConstants with api.Logger
Base implementation for all OpenID providers.
- trait OpenIDService extends AnyRef
The OpenID service trait.
- case class OpenIDSettings(providerURL: String, callbackURL: String, axRequired: Map[String, String] = Map.empty, axOptional: Map[String, String] = Map.empty, realm: Option[String] = None) extends Product with Serializable
The OpenID settings.
The OpenID settings.
- providerURL
The OpenID provider URL used if no openID was given. @see https://willnorris.com/2009/07/openid-directed-identity-identifier-select
- callbackURL
The callback URL to the application after a successful authentication on the OpenID provider. The URL can be a relative path which will be resolved against the current request's host.
- axRequired
Required attributes to return from the provider after a successful authentication.
- axOptional
Optional attributes to return from the provider after a successful authentication.
- realm
An URL pattern that represents the part of URL-space for which an OpenID Authentication request is valid.
- trait PasswordProvider extends Provider with ExecutionContextProvider
Base provider which provides shared functionality to authenticate with a password.
- trait PublishableSocialStateItemHandler extends AnyRef
A state item handler which can publish its internal state to the client.
A state item handler which can publish its internal state to the client.
Some state item handlers, like the CSRF state handler, needs the ability to publish state to a cookie. So if you have such a state item handler, then mixin this trait, to publish the state item to the client.
- trait SocialProfile extends AnyRef
The social profile contains all the data returned from the social providers after authentication.
- trait SocialProfileBuilder extends AnyRef
Builds the social profile.
- trait SocialProfileParser[C, P <: SocialProfile, A <: AuthInfo] extends AnyRef
Parses a social profile.
Parses a social profile.
A parser transforms the content returned from the provider into a social profile instance. Parsers can be reused by other parsers to avoid duplicating code.
- C
The content type to parse a profile from.
- P
The type of the profile to parse to.
- A
The type of the auth info.
- trait SocialProvider extends Provider with SocialProfileBuilder with ExecutionContextProvider
The base interface for all social providers.
- case class SocialProviderRegistry(providers: Seq[SocialProvider]) extends Product with Serializable
A registry that holds and provides access to all social provider implementations.
A registry that holds and provides access to all social provider implementations.
- providers
The list of social providers.
- case class SocialState(items: Set[SocialStateItem]) extends Product with Serializable
Represents the state a social provider can handle.
Represents the state a social provider can handle.
The state consists of a
Setcontaining different state items.- items
The list of social state items.
- trait SocialStateHandler extends AnyRef
Provides a way to handle different types of state for providers that allow a state param.
Provides a way to handle different types of state for providers that allow a state param.
Some authentication protocols defines a state param which can be used to transport some state to an authentication provider. The authentication provider sends this state back to the application, after the authentication to the provider was granted.
The state parameter can be used for different things. Silhouette provides two state handlers out of the box. One state handler can transport additional user state to the provider. This could be an URL were the user should be redirected after authentication to the provider, or any other per-authentication based state. An other important state handler protects the application for CSRF attacks.
- trait SocialStateItem extends AnyRef
An item which can be a part of a social state.
An item which can be a part of a social state.
The social state consists of one state item per handler. So this item describes the state an handler can handle. A state item can be of any type. The handler to which the state item pertains, must be able to serialize/deserialize this state item.
- trait SocialStateItemHandler extends AnyRef
Handles state for different purposes.
- trait SocialStateProvider extends SocialProvider
Extends the SocialProvider with the ability to handle provider specific state.
- case class StatefulAuthInfo[+A <: AuthInfo, +S <: SocialStateItem](authInfo: A, userState: S) extends Product with Serializable
A stateful auth info, wraps the
AuthInfowith user state.A stateful auth info, wraps the
AuthInfowith user state.- A
The type of the auth info.
- S
The type of the user state.
- authInfo
The auth info.
- userState
The user state.
Value Members
- object BasicAuthProvider
The companion object.
- object CredentialsProvider
The companion object.
- object DefaultSocialStateHandler
The companion object for the DefaultSocialStateHandler class.
- object OAuth1Provider extends OAuth1Constants
The OAuth1Provider companion object.
- object OAuth2Info extends OAuth2Constants with Serializable
The Oauth2 info companion object.
- object OAuth2Provider extends OAuth2Constants
The OAuth2Provider companion object.
- object OpenIDProvider extends OpenIDConstants
The OpenIDProvider companion object.
- object PasswordProvider
The companion object.
- object SocialProfileBuilder
The companion object.
- object SocialStateItem
The companion object of the SocialStateItem.