trait SocialStateProvider extends SocialProvider
Extends the SocialProvider with the ability to handle provider specific state.
- Alphabetic
- By Inheritance
- SocialStateProvider
- SocialProvider
- ExecutionContextProvider
- SocialProfileBuilder
- Provider
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- abstract type A <: AuthInfo
The type of the auth info.
The type of the auth info.
- Definition Classes
- SocialProvider
- abstract type Content
The content type to parse a profile from.
The content type to parse a profile from.
- Definition Classes
- SocialProfileBuilder
- 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
- 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
- abstract type Settings
The settings type.
The settings type.
- Definition Classes
- SocialProvider
Abstract Value Members
- abstract 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.Resultthat 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 item.
- B
The type of the request body.
- format
The JSON format to transform the user state into JSON.
- request
The request.
- classTag
The class tag for the user state item.
- returns
Either a
play.api.mvc.Resultor the StatefulAuthInfo from the provider.
- abstract def authenticate[B]()(implicit request: ExtractableRequest[B]): Future[Either[Result, A]]
Authenticates the user and returns the auth information.
Authenticates the user and returns the auth information.
Returns either a
AuthInfoif all went OK or aplay.api.mvc.Resultthat the controller sends to the browser (e.g.: in the case of OAuth where the user needs to be redirected to the service provider).- B
The type of the request body.
- request
The request.
- returns
Either a
play.api.mvc.Resultor theAuthInfofrom the provider.
- Definition Classes
- SocialProvider
- abstract def buildProfile(authInfo: A): Future[Profile]
Subclasses need to implement this method to populate the profile information from the service provider.
Subclasses need to implement this method to populate the profile information from the service provider.
- authInfo
The auth info received from the provider.
- returns
On success the build social profile, otherwise a failure.
- Attributes
- protected
- Definition Classes
- SocialProfileBuilder
- abstract val httpLayer: HTTPLayer
The HTTP layer implementation.
The HTTP layer implementation.
- Attributes
- protected
- Definition Classes
- SocialProvider
- abstract def id: String
Gets the provider ID.
- 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
- abstract def settings: Settings
Gets the provider settings.
- abstract def urls: Map[String, String]
Gets the URLs that are needed to retrieve the profile data.
Gets the URLs that are needed to retrieve the profile data.
Some providers need more than one request to different URLs to query the profile data. So we use a Map here to allow defining multiple URLs.
- returns
The URLs that are needed to retrieve the profile data.
- Attributes
- protected
- Definition Classes
- SocialProfileBuilder
- 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit val executionContext: ExecutionContext
The execution context to handle the asynchronous operations.
The execution context to handle the asynchronous operations.
- Definition Classes
- SocialProvider → ExecutionContextProvider
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- 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
- 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
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)