Packages

trait BaseAuth0Provider extends OAuth2Provider

Base Auth0 OAuth2 Provider.

OAuth Provider configuration in silhouette.conf must indicate:

# Auth0 Service URLs auth0.authorizationURL="https://mydomain.eu.auth0.com/authorize" auth0.accessTokenURL="https://mydomain.eu.auth0.com/oauth/token" auth0.apiURL="https://mydomain.eu.auth0.com/userinfo"

# Application URL and credentials auth0.redirectURL="http://localhost:9000/authenticate/auth0" auth0.clientID=myoauthclientid auth0.clientSecret=myoauthclientsecret

# Auth0 user's profile information requested auth0.scope="openid profile email"

See http://auth0.com for more information on the Auth0 Auth 2.0 Provider and Service.

Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BaseAuth0Provider
  2. OAuth2Provider
  3. Logger
  4. OAuth2Constants
  5. SocialStateProvider
  6. SocialProvider
  7. ExecutionContextProvider
  8. SocialProfileBuilder
  9. Provider
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type A = OAuth2Info

    The type of the auth info.

    The type of the auth info.

    Definition Classes
    OAuth2ProviderSocialProvider
  2. type Content = JsValue

    The content type to parse a profile from.

    The content type to parse a profile from.

    Definition Classes
    BaseAuth0ProviderSocialProfileBuilder
  3. abstract type Profile <: SocialProfile

    The type of the profile a profile builder is responsible for.

    The type of the profile a profile builder is responsible for.

    Definition Classes
    SocialProfileBuilder
  4. abstract type Self <: SocialProvider

    The type of the concrete implementation of this abstract type.

    The type of the concrete implementation of this abstract type.

    Definition Classes
    SocialProvider
  5. type Settings = OAuth2Settings

    The settings type.

    The settings type.

    Definition Classes
    OAuth2ProviderSocialProvider

Abstract Value Members

  1. abstract val httpLayer: HTTPLayer

    The HTTP layer implementation.

    The HTTP layer implementation.

    Attributes
    protected
    Definition Classes
    SocialProvider
  2. abstract def profileParser: SocialProfileParser[Content, Profile, A]

    Returns the profile parser implementation.

    Returns the profile parser implementation.

    returns

    The profile parser implementation.

    Attributes
    protected
    Definition Classes
    SocialProfileBuilder
  3. abstract def settings: Settings

    Gets the provider settings.

    Gets the provider settings.

    returns

    The provider settings.

    Definition Classes
    SocialProvider
  4. abstract val stateHandler: SocialStateHandler

    The social state handler implementation.

    The social state handler implementation.

    Attributes
    protected
    Definition Classes
    OAuth2Provider
  5. abstract def withSettings(f: (Settings) => Settings): Self

    Gets a provider initialized with a new settings object.

    Gets a provider initialized with a new settings object.

    f

    A function which gets the settings passed and returns different settings.

    returns

    An instance of the provider initialized with new settings.

    Definition Classes
    SocialProvider

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val AccessDenied: String
    Definition Classes
    OAuth2Constants
  5. val AccessToken: String
    Definition Classes
    OAuth2Constants
  6. val AuthorizationCode: String
    Definition Classes
    OAuth2Constants
  7. val ClientID: String
    Definition Classes
    OAuth2Constants
  8. val ClientSecret: String
    Definition Classes
    OAuth2Constants
  9. val Code: String
    Definition Classes
    OAuth2Constants
  10. val Error: String
    Definition Classes
    OAuth2Constants
  11. val Expires: String
    Definition Classes
    OAuth2Constants
  12. val ExpiresIn: String
    Definition Classes
    OAuth2Constants
  13. val GrantType: String
    Definition Classes
    OAuth2Constants
  14. val RedirectURI: String
    Definition Classes
    OAuth2Constants
  15. val RefreshToken: String
    Definition Classes
    OAuth2Constants
  16. val ResponseType: String
    Definition Classes
    OAuth2Constants
  17. val Scope: String
    Definition Classes
    OAuth2Constants
  18. val State: String
    Definition Classes
    OAuth2Constants
  19. val TokenType: String
    Definition Classes
    OAuth2Constants
  20. val accessTokeResponseCode: Int

    The default access token response code.

    The default access token response code.

    Override this if a specific provider uses another HTTP status code for a successful access token response.

    Attributes
    protected
    Definition Classes
    OAuth2Provider
  21. implicit val accessTokenReads: Reads[OAuth2Info]

    The implicit access token reads.

    The implicit access token reads.

    Override this if a specific provider needs another reads.

    Attributes
    protected
    Definition Classes
    OAuth2Provider
  22. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  23. def authenticate[S <: SocialStateItem, B](userState: S)(implicit format: Format[S], request: ExtractableRequest[B], classTag: ClassTag[S]): Future[Either[Result, StatefulAuthInfo[A, S]]]

    Authenticates the user and returns the auth information and the user state.

    Authenticates the user and returns the auth information and the user state.

    Returns either a StatefulAuthInfo if all went OK or a play.api.mvc.Result that the controller sends to the browser (e.g.: in the case of OAuth where the user needs to be redirected to the service provider).

    S

    The type of the user state.

    B

    The type of the request body.

    format

    The JSON format to the transform the user state into JSON.

    request

    The request.

    classTag

    The class tag for the user state item.

    returns

    Either a play.api.mvc.Result or the StatefulAuthInfo from the provider.

    Definition Classes
    OAuth2ProviderSocialStateProvider
  24. def authenticate[B]()(implicit request: ExtractableRequest[B]): Future[Either[Result, OAuth2Info]]

    Starts the authentication process.

    Starts the authentication process.

    B

    The type of the request body.

    request

    The current request.

    returns

    Either a Result or the auth info from the provider.

    Definition Classes
    OAuth2ProviderSocialProvider
  25. def buildInfo(response: WSResponse): Try[OAuth2Info]

    Builds the OAuth2 info from response.

    Builds the OAuth2 info from response.

    response

    The response from the provider.

    returns

    The OAuth2 info on success, otherwise a failure.

    Attributes
    protected
    Definition Classes
    OAuth2Provider
  26. def buildProfile(authInfo: OAuth2Info): Future[Profile]

    Builds the social profile.

    Builds the social profile.

    authInfo

    The auth info received from the provider.

    returns

    On success the build social profile, otherwise a failure.

    Attributes
    protected
    Definition Classes
    BaseAuth0ProviderSocialProfileBuilder
  27. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  28. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  30. implicit val executionContext: ExecutionContext

    The execution context to handle the asynchronous operations.

    The execution context to handle the asynchronous operations.

    Definition Classes
    SocialProviderExecutionContextProvider
  31. def getAccessToken(code: String)(implicit request: RequestHeader): Future[OAuth2Info]

    Gets the access token.

    Gets the access token.

    code

    The access code.

    request

    The current request.

    returns

    The info containing the access token.

    Attributes
    protected
    Definition Classes
    BaseAuth0ProviderOAuth2Provider
  32. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  33. def handleAuthorizationFlow[B](socialStateHandler: SocialStateHandler)(implicit request: ExtractableRequest[B]): Future[Result]

    Handles the authorization step of the OAuth2 flow.

    Handles the authorization step of the OAuth2 flow.

    B

    The type of the request body.

    socialStateHandler

    The state handler to use.

    request

    The request.

    returns

    The redirect to the authorization URL of the OAuth2 provider.

    Attributes
    protected
    Definition Classes
    OAuth2Provider
  34. def handleFlow[L, R, B](left: => Future[L])(right: (String) => Future[R])(implicit request: ExtractableRequest[B]): Future[Either[L, R]]

    Handles the OAuth2 flow.

    Handles the OAuth2 flow.

    The left flow is the authorization flow, which will be processed, if no code parameter exists in the request. The right flow is the access token flow, which will be executed after a successful authorization.

    L

    The return type of the left flow.

    R

    The return type of the right flow.

    B

    The type of the request body.

    left

    The authorization flow.

    right

    The access token flow.

    request

    The request.

    returns

    Either the left or the right flow.

    Definition Classes
    OAuth2Provider
  35. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  36. val headers: Seq[(String, String)]

    A list with headers to send to the API.

    A list with headers to send to the API.

    Attributes
    protected
    Definition Classes
    OAuth2Provider
  37. val id: String

    The provider ID.

    The provider ID.

    returns

    The provider ID.

    Definition Classes
    BaseAuth0ProviderProvider
  38. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  39. val logger: api.Logger

    A named logger instance.

    A named logger instance.

    Definition Classes
    Logger
  40. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  41. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  42. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  43. def resolveCallbackURL(url: String)(implicit request: RequestHeader): String

    Resolves the url to be absolute relative to the request.

    Resolves the url to be absolute relative to the request.

    This will pass the url through if its already absolute.

    url

    The url to resolve.

    request

    The current request.

    returns

    The absolute url.

    Attributes
    protected
    Definition Classes
    SocialProvider
  44. def retrieveProfile(authInfo: A): Future[Profile]

    Retrieves the user profile for the given auth info.

    Retrieves the user profile for the given auth info.

    This method can be used to retrieve the profile information for an already authenticated identity.

    authInfo

    The auth info for which the profile information should be retrieved.

    returns

    The profile information for the given auth info.

    Definition Classes
    SocialProvider
  45. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  46. def toString(): String
    Definition Classes
    AnyRef → Any
  47. val urls: Map[String, String]

    Defines the URLs that are needed to retrieve the profile data.

    Defines the URLs that are needed to retrieve the profile data.

    returns

    The URLs that are needed to retrieve the profile data.

    Attributes
    protected
    Definition Classes
    BaseAuth0ProviderSocialProfileBuilder
  48. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  49. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  50. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from OAuth2Provider

Inherited from api.Logger

Inherited from OAuth2Constants

Inherited from SocialStateProvider

Inherited from SocialProvider

Inherited from SocialProfileBuilder

Inherited from Provider

Inherited from AnyRef

Inherited from Any

Ungrouped