Class/Object

com.mohiva.play.silhouette.impl.providers.oauth2

FacebookProvider

Related Docs: object FacebookProvider | package oauth2

Permalink

class FacebookProvider extends BaseFacebookProvider with CommonSocialProfileBuilder

The Facebook OAuth2 Provider.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FacebookProvider
  2. CommonSocialProfileBuilder
  3. BaseFacebookProvider
  4. OAuth2Provider
  5. Logger
  6. OAuth2Constants
  7. SocialStateProvider
  8. SocialProvider
  9. ExecutionContextProvider
  10. SocialProfileBuilder
  11. Provider
  12. AnyRef
  13. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FacebookProvider(httpLayer: HTTPLayer, stateHandler: SocialStateHandler, settings: OAuth2Settings)

    Permalink

    httpLayer

    The HTTP layer implementation.

    stateHandler

    The state provider implementation.

    settings

    The provider settings.

Type Members

  1. type A = OAuth2Info

    Permalink

    The type of the auth info.

    The type of the auth info.

    Definition Classes
    OAuth2ProviderSocialProvider
  2. type Content = JsValue

    Permalink

    The content type to parse a profile from.

    The content type to parse a profile from.

    Definition Classes
    BaseFacebookProviderSocialProfileBuilder
  3. type Profile = CommonSocialProfile

    Permalink

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

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

    Definition Classes
    CommonSocialProfileBuilder
  4. type Self = FacebookProvider

    Permalink

    The type of this class.

    The type of this class.

    Definition Classes
    FacebookProviderSocialProvider
  5. type Settings = OAuth2Settings

    Permalink

    The settings type.

    The settings type.

    Definition Classes
    OAuth2ProviderSocialProvider

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val AccessDenied: String

    Permalink
    Definition Classes
    OAuth2Constants
  5. val AccessToken: String

    Permalink
    Definition Classes
    OAuth2Constants
  6. val AuthorizationCode: String

    Permalink
    Definition Classes
    OAuth2Constants
  7. val ClientID: String

    Permalink
    Definition Classes
    OAuth2Constants
  8. val ClientSecret: String

    Permalink
    Definition Classes
    OAuth2Constants
  9. val Code: String

    Permalink
    Definition Classes
    OAuth2Constants
  10. val Error: String

    Permalink
    Definition Classes
    OAuth2Constants
  11. val Expires: String

    Permalink
    Definition Classes
    OAuth2Constants
  12. val ExpiresIn: String

    Permalink
    Definition Classes
    OAuth2Constants
  13. val GrantType: String

    Permalink
    Definition Classes
    OAuth2Constants
  14. val RedirectURI: String

    Permalink
    Definition Classes
    OAuth2Constants
  15. val RefreshToken: String

    Permalink
    Definition Classes
    OAuth2Constants
  16. val ResponseType: String

    Permalink
    Definition Classes
    OAuth2Constants
  17. val Scope: String

    Permalink
    Definition Classes
    OAuth2Constants
  18. val State: String

    Permalink
    Definition Classes
    OAuth2Constants
  19. val TokenType: String

    Permalink
    Definition Classes
    OAuth2Constants
  20. val accessTokeResponseCode: Int

    Permalink

    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]

    Permalink

    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

    Permalink
    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]]]

    Permalink

    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]]

    Permalink

    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]

    Permalink

    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]

    Permalink

    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
    BaseFacebookProviderSocialProfileBuilder
  27. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  30. implicit val executionContext: ExecutionContext

    Permalink

    The execution context to handle the asynchronous operations.

    The execution context to handle the asynchronous operations.

    Definition Classes
    SocialProviderExecutionContextProvider
  31. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  32. def getAccessToken(code: String)(implicit request: RequestHeader): Future[OAuth2Info]

    Permalink

    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
    OAuth2Provider
  33. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  34. def handleAuthorizationFlow[B](stateHandler: SocialStateHandler)(implicit request: ExtractableRequest[B]): Future[Result]

    Permalink

    Handles the authorization step of the OAuth2 flow.

    Handles the authorization step of the OAuth2 flow.

    B

    The type of the request body.

    stateHandler

    The state handler to use.

    request

    The request.

    returns

    The redirect to the authorization URL of the OAuth2 provider.

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

    Permalink

    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
  36. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  37. val headers: Seq[(String, String)]

    Permalink

    A list with headers to send to the API.

    A list with headers to send to the API.

    Attributes
    protected
    Definition Classes
    OAuth2Provider
  38. val httpLayer: HTTPLayer

    Permalink

    The HTTP layer implementation.

    The HTTP layer implementation.

    Attributes
    protected
    Definition Classes
    FacebookProviderSocialProvider
  39. val id: String

    Permalink

    The provider ID.

    The provider ID.

    returns

    The provider ID.

    Definition Classes
    BaseFacebookProviderProvider
  40. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  41. val logger: Logger

    Permalink

    A named logger instance.

    A named logger instance.

    Definition Classes
    Logger
  42. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  43. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  44. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  45. val profileParser: FacebookProfileParser

    Permalink

    The profile parser implementation.

    The profile parser implementation.

    returns

    The profile parser implementation.

    Definition Classes
    FacebookProviderSocialProfileBuilder
  46. def resolveCallbackURL(url: String)(implicit request: RequestHeader): String

    Permalink

    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
  47. def retrieveProfile(authInfo: A): Future[Profile]

    Permalink

    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
  48. val settings: OAuth2Settings

    Permalink

    The provider settings.

    The provider settings.

    Definition Classes
    FacebookProviderSocialProvider
  49. val stateHandler: SocialStateHandler

    Permalink

    The state provider implementation.

    The state provider implementation.

    Attributes
    protected
    Definition Classes
    FacebookProviderOAuth2Provider
  50. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  51. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  52. val urls: Map[String, String]

    Permalink

    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
    BaseFacebookProviderSocialProfileBuilder
  53. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. def withSettings(f: (Settings) ⇒ Settings): FacebookProvider

    Permalink

    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
    FacebookProviderSocialProvider

Inherited from BaseFacebookProvider

Inherited from OAuth2Provider

Inherited from Logger

Inherited from OAuth2Constants

Inherited from SocialStateProvider

Inherited from SocialProvider

Inherited from ExecutionContextProvider

Inherited from SocialProfileBuilder

Inherited from Provider

Inherited from AnyRef

Inherited from Any

Ungrouped