Class Authenticator

  • All Implemented Interfaces:
    java.io.Serializable

    @Named("authenticator")
    @RequestScoped
    public class Authenticator
    extends java.lang.Object
    implements java.io.Serializable
    Provides authentication using oAuth
    Author:
    Reda Zerrad Date: 05.11.2012, Yuriy Movchan Date: 02.12.2013
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Authenticator()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String authenticate()  
      java.lang.String oAuthGetAccessToken()
      After successful login, oxAuth will redirect user to this method.
      boolean oAuthLogin()
      Main entry point for oAuth authentication.
      boolean preAuthenticate()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Authenticator

        public Authenticator()
    • Method Detail

      • preAuthenticate

        public boolean preAuthenticate()
                                throws java.io.IOException,
                                       java.lang.Exception
        Throws:
        java.io.IOException
        java.lang.Exception
      • authenticate

        protected java.lang.String authenticate()
      • oAuthLogin

        public boolean oAuthLogin()
                           throws java.io.IOException,
                                  java.lang.Exception
        Main entry point for oAuth authentication.
        Throws:
        java.io.IOException
        java.lang.Exception
      • oAuthGetAccessToken

        public java.lang.String oAuthGetAccessToken()
                                             throws org.codehaus.jettison.json.JSONException
        After successful login, oxAuth will redirect user to this method. Obtains access token using authorization code and verifies if access token is valid
        Returns:
        Throws:
        org.codehaus.jettison.json.JSONException