Class FacebookService

java.lang.Object
eu.webtoolkit.jwt.auth.OAuthService
eu.webtoolkit.jwt.auth.FacebookService

public class FacebookService
extends OAuthService
OAuth service for Facebook as third-party authenticator.

The configuration of the service is done using properties, whose values need to match the values configured at Facebook.

  • facebook-oauth2-redirect-endpoint: the URL of the local redirect endpoint, to which the Facebook OAuth service redirects the user after authentication. See also getRedirectEndpoint()
  • facebook-oauth2-redirect-endpoint-path: optionally, the deployment path that corresponds to the redirect endpoint. See also getRedirectEndpointPath()
  • facebook-oauth2-app-id: The application ID
  • facebook-oauth2-app-secret: The application secret.

For example:


 <properties>
 <property name="facebook-oauth2-redirect-endpoint">
 http://localhost:8080/oauth2callback
 </property>
 <property name="facebook-oauth2-app-id">
 1234567890123456
 </property>
 <property name="facebook-oauth2-app-secret">
 a3cf1630b1ae415c7260d849efdf444d
 </property>
 </properties>

 

Like all service classes, this class holds only configuration state. Thus, once configured, it can be safely shared between multiple sessions since its state (the configuration) is read-only.

See also: http://developers.facebook.com/docs/authentication/