com.sage.orion.sdata.servlet.accpac
Class AuthenticatorImpl

java.lang.Object
  extended by com.sage.orion.sdata.servlet.accpac.AuthenticatorImpl
All Implemented Interfaces:
Authenticator

public final class AuthenticatorImpl
extends java.lang.Object
implements Authenticator

This class handles authenticating a Sage 300 ERP user.

It is made public only for use by the SWT Services code. Do not use this class in your own code; it is likely to change at frequent intervals.


Constructor Summary
AuthenticatorImpl(javax.servlet.http.HttpServletRequest request, java.lang.String company, javax.servlet.http.HttpServletResponse response)
          Deprecated. Use the constructor that includes the Provider
AuthenticatorImpl(javax.servlet.http.HttpServletRequest request, java.lang.String company, javax.servlet.http.HttpServletResponse response, Provider accpacProvider)
          Constructor
 
Method Summary
 void dispose()
          signals that the Authenticator will not be used any further.
 java.lang.String getApplicationAuthenticationToken()
          
static com.sage.accpac.sm.program.IProgram getIProgramFromToken(java.lang.String token)
          Gets the AccpacProgram from the Program token.
static com.sage.accpac.sm.Program getProgramFromToken(java.lang.String token)
          Gets the AccpacProgram from the Program token.
static com.sage.accpac.sm.SharedDataSet getSharedDataSet(java.lang.String token)
          Deprecated. without replacement
 java.lang.String getSystemAuthenticationToken()
          Gets the authentication token for the user.
static java.lang.String getTenantID(java.lang.String token)
          Returns the tenant id for the user.
static java.lang.String getUserID(java.lang.String token)
          Gets the user id for the given authentication Token.
static java.lang.String getUserInstance(java.lang.String token)
          Deprecated. without replacement
static java.lang.String getUserLanguage(java.lang.String token)
          Gets the user language for the given authentication Token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthenticatorImpl

@Deprecated
public AuthenticatorImpl(javax.servlet.http.HttpServletRequest request,
                                    java.lang.String company,
                                    javax.servlet.http.HttpServletResponse response)
Deprecated. Use the constructor that includes the Provider

Constructor

Parameters:
request - the request coming in
company - the company or dataset
response - the response, just in case we need to use it

AuthenticatorImpl

public AuthenticatorImpl(javax.servlet.http.HttpServletRequest request,
                         java.lang.String company,
                         javax.servlet.http.HttpServletResponse response,
                         Provider accpacProvider)
Constructor

Parameters:
request - the request coming in
company - the company or dataset
response - the response, just in case we need to use it
accpacProvider - the (non-null) Sage 300 ERP (formerly Accpac) Provider
Method Detail

getApplicationAuthenticationToken

public java.lang.String getApplicationAuthenticationToken()

Specified by:
getApplicationAuthenticationToken in interface Authenticator

getSystemAuthenticationToken

public java.lang.String getSystemAuthenticationToken()
Description copied from interface: Authenticator
Gets the authentication token for the user. If the user is not authenticated returns null.

Specified by:
getSystemAuthenticationToken in interface Authenticator
Returns:
the authentication token. Returns null if the user is not authenticated.

getProgramFromToken

public static com.sage.accpac.sm.Program getProgramFromToken(java.lang.String token)
Gets the AccpacProgram from the Program token.

Parameters:
token - the Accpac Program token
Returns:
the Accpac Program or null if not found.
See Also:
getIProgramFromToken(String)

getIProgramFromToken

public static com.sage.accpac.sm.program.IProgram getIProgramFromToken(java.lang.String token)
Gets the AccpacProgram from the Program token.

Parameters:
token - the Accpac Program token
Returns:
the Accpac Program or null if not found.

getSharedDataSet

@Deprecated
public static com.sage.accpac.sm.SharedDataSet getSharedDataSet(java.lang.String token)
Deprecated. without replacement

Gets the shared data set for the given token.

Parameters:
token - the token returned by getApplicationAuthenticationToken()
Returns:
the SharedDataSet

getUserID

public static java.lang.String getUserID(java.lang.String token)
Gets the user id for the given authentication Token.

Parameters:
token - the authentication token whose language is wanted.
Returns:
the user id for the given authentication token or null if not found.

getUserLanguage

public static java.lang.String getUserLanguage(java.lang.String token)
Gets the user language for the given authentication Token.

Parameters:
token - the authentication token whose language is wanted.
Returns:
the user language for the given authentication token or null if not found.

getUserInstance

@Deprecated
public static java.lang.String getUserInstance(java.lang.String token)
Deprecated. without replacement

Gets the user instance for the current logon session.

Parameters:
token - the authentication token whose language is wanted.
Returns:
the user instance for the given authentication token or null if not found.

getTenantID

public static java.lang.String getTenantID(java.lang.String token)
Returns the tenant id for the user.

This is only for use internally. Do not use.

Parameters:
token - authentication token
Returns:
the tenant id or null if not running in a hosted environment.

dispose

public void dispose()
Description copied from interface: Authenticator
signals that the Authenticator will not be used any further.

This should not throw exceptions.

Specified by:
dispose in interface Authenticator


Copyright © 2011 Sage Software, Inc. All rights reserved.