org.alfresco.webservice.util
Class AuthenticationUtils

java.lang.Object
  extended by org.alfresco.webservice.util.AuthenticationUtils
All Implemented Interfaces:
javax.security.auth.callback.CallbackHandler

public class AuthenticationUtils
extends java.lang.Object
implements javax.security.auth.callback.CallbackHandler


Constructor Summary
AuthenticationUtils()
           
 
Method Summary
static void endSession()
          Ends the current session
static AuthenticationDetails getAuthenticationDetails()
          Get the authentication details for the current thread
static org.apache.axis.EngineConfiguration getEngineConfiguration()
          Gets the engine configuration used to create the web service references
static java.lang.String getTicket()
          Get the ticket for the current authentication details on the current thread
 void handle(javax.security.auth.callback.Callback[] callbacks)
          The implementation of the passwrod call back used by the WS Security
static boolean isCurrentTicketTimedOut()
           
static void setAuthenticationDetails(AuthenticationDetails authenticationDetails)
           
static void startSession(java.lang.String username, java.lang.String password)
          Start a session
static void startSession(java.lang.String username, java.lang.String password, long timeoutInterval)
          Start a session
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthenticationUtils

public AuthenticationUtils()
Method Detail

startSession

public static void startSession(java.lang.String username,
                                java.lang.String password)
                         throws org.alfresco.webservice.authentication.AuthenticationFault
Start a session

Parameters:
username -
password -
Throws:
org.alfresco.webservice.authentication.AuthenticationFault

startSession

public static void startSession(java.lang.String username,
                                java.lang.String password,
                                long timeoutInterval)
                         throws org.alfresco.webservice.authentication.AuthenticationFault
Start a session

Parameters:
username -
password -
timeoutInterval - timeout interval
Throws:
org.alfresco.webservice.authentication.AuthenticationFault

setAuthenticationDetails

public static void setAuthenticationDetails(AuthenticationDetails authenticationDetails)

isCurrentTicketTimedOut

public static boolean isCurrentTicketTimedOut()
Returns:
if timeoutInterval is not set return false.

endSession

public static void endSession()
Ends the current session


getTicket

public static java.lang.String getTicket()
Get the ticket for the current authentication details on the current thread

Returns:
String the ticket

getAuthenticationDetails

public static AuthenticationDetails getAuthenticationDetails()
Get the authentication details for the current thread

Returns:
the authentication details

handle

public void handle(javax.security.auth.callback.Callback[] callbacks)
            throws java.io.IOException,
                   javax.security.auth.callback.UnsupportedCallbackException
The implementation of the passwrod call back used by the WS Security

Specified by:
handle in interface javax.security.auth.callback.CallbackHandler
Throws:
java.io.IOException
javax.security.auth.callback.UnsupportedCallbackException
See Also:
CallbackHandler.handle(javax.security.auth.callback.Callback[])

getEngineConfiguration

public static org.apache.axis.EngineConfiguration getEngineConfiguration()
Gets the engine configuration used to create the web service references

Returns:
EngineConfiguration the engine configuration


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.