com.taggercat.security
Class LoginInfo

java.lang.Object
  extended by com.taggercat.security.LoginInfo
All Implemented Interfaces:
java.io.Serializable

public class LoginInfo
extends java.lang.Object
implements java.io.Serializable

This class represents a collection of information about a user's login request and subsequent login status.
An instance of this class is created for each login, and is passed to your security provider implementation for authentication.

The SecurityProvider fills in the details reflecting the success or failure of the login request.

The SecurityProvider must also fill in the user's list of group names, and associated group Ids.

See Also:
SecurityProvider, Serialized Form
 

Constructor Summary
LoginInfo(long userid)
          LoginInfo constructor ( usually used in unit testing )
LoginInfo(java.lang.String loginName, java.lang.String password, boolean encryptPswd)
          LoginInfo constructor
LoginInfo(java.lang.String loginName, java.lang.String password, java.lang.String host, boolean encryptPswd)
          Constructor that includes the client host address
 
Method Summary
 java.lang.String getFullName()
          Gets the user's full name, if available
 java.lang.String getGroupIDsList()
           
 java.lang.String getGroupNames()
           
 java.util.List<java.lang.String> getGroupNamesList()
           
 java.lang.String getHost()
          Gets the clients host IP address
 java.lang.String getLoginName()
          Gets the login name
 java.lang.String getPassword()
          Gets the password
 java.lang.String getReasonDenied()
           
 java.lang.String getTenantName()
           
 long getUserid()
          Gets the user id
 boolean isAuthenticated()
          Gets the authentication status
 boolean isEncrypted()
           
 void setAuthenticated(boolean authenticated)
          Sets the authentication state
 void setDeniedReason(java.lang.String reasonDenied)
          Sets the denied reason
 void setEncrypted(boolean encrypted)
           
 void setFullName(java.lang.String fullName)
          Sets the full name
 void setGroupIDsList(java.lang.String groupIDsList)
           
 void setGroupNames(java.lang.String groupNames)
           
 void setGroupNamesList(java.util.List<java.lang.String> groupNamesList)
           
 void setHost(java.lang.String host)
           
 void setLoginName(java.lang.String loginName)
          Sets the login name
 void setPassword(java.lang.String password)
          Sets the password
 void setReasonDenied(java.lang.String reasonDenied)
           
 void setTenantName(java.lang.String tenantName)
           
 void setUserid(long userid)
          Sets the user id
 java.lang.String toString()
          Returns a string containing all the info in this class
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LoginInfo

public LoginInfo(long userid)
LoginInfo constructor ( usually used in unit testing )

Parameters:
userid - the user DB id

LoginInfo

public LoginInfo(java.lang.String loginName,
                 java.lang.String password,
                 boolean encryptPswd)
LoginInfo constructor

Parameters:
loginName - the login name
password - the login password

LoginInfo

public LoginInfo(java.lang.String loginName,
                 java.lang.String password,
                 java.lang.String host,
                 boolean encryptPswd)
Constructor that includes the client host address

Parameters:
loginName - the login name
password - the login password
host - the host the client has connected from
Method Detail

getLoginName

public java.lang.String getLoginName()
Gets the login name

Returns:
the login name

getPassword

public java.lang.String getPassword()
Gets the password

Returns:
the password

getFullName

public java.lang.String getFullName()
Gets the user's full name, if available

Returns:
the user's full name

getUserid

public long getUserid()
Gets the user id

Returns:
the user id

isAuthenticated

public boolean isAuthenticated()
Gets the authentication status

Returns:
true if the authentication succeeded

getHost

public java.lang.String getHost()
Gets the clients host IP address

Returns:
the clients host IP address

setLoginName

public void setLoginName(java.lang.String loginName)
Sets the login name

Parameters:
loginName - the login name

setPassword

public void setPassword(java.lang.String password)
Sets the password

Parameters:
password - the password

setFullName

public void setFullName(java.lang.String fullName)
Sets the full name

Parameters:
fullName - the full name

setDeniedReason

public void setDeniedReason(java.lang.String reasonDenied)
Sets the denied reason

Parameters:
reasonDenied - the authentication denied reason

setUserid

public void setUserid(long userid)
Sets the user id

Parameters:
userid - the user id

setAuthenticated

public void setAuthenticated(boolean authenticated)
Sets the authentication state

Parameters:
authenticated - the authentication state

isEncrypted

public boolean isEncrypted()

setEncrypted

public void setEncrypted(boolean encrypted)

getReasonDenied

public java.lang.String getReasonDenied()

setReasonDenied

public void setReasonDenied(java.lang.String reasonDenied)

setHost

public void setHost(java.lang.String host)

getGroupNames

public java.lang.String getGroupNames()

setGroupNames

public void setGroupNames(java.lang.String groupNames)

getGroupNamesList

public java.util.List<java.lang.String> getGroupNamesList()

setGroupNamesList

public void setGroupNamesList(java.util.List<java.lang.String> groupNamesList)

getGroupIDsList

public java.lang.String getGroupIDsList()

setGroupIDsList

public void setGroupIDsList(java.lang.String groupIDsList)

toString

public java.lang.String toString()
Returns a string containing all the info in this class

Overrides:
toString in class java.lang.Object
Returns:
A string suitable for System.out messages

getTenantName

public java.lang.String getTenantName()
Returns:
the tenantName

setTenantName

public void setTenantName(java.lang.String tenantName)
Parameters:
tenantName - the tenantName to set