railo.runtime.security
Class CredentialImpl

java.lang.Object
  extended by railo.runtime.security.CredentialImpl
All Implemented Interfaces:
ScriptConvertable, Credential

public final class CredentialImpl
extends Object
implements Credential

User Password Information


Constructor Summary
CredentialImpl(String username, Resource rolesDir)
          credential constructor
CredentialImpl(String username, String password, Array roles, Resource rolesDir)
          credential constructor
CredentialImpl(String username, String password, Resource rolesDir)
          credential constructor
CredentialImpl(String username, String password, String[] roles, Resource rolesDir)
          credential constructor
CredentialImpl(String username, String password, String roles, Resource rolesDir)
          credential constructor
 
Method Summary
static Credential decode(Object encoded, Resource rolesDir)
          decode the Credential form a Base64 String value
 String encode()
          encode rhe Credential to a Base64 String value
 String getPassword()
           
 String[] getRoles()
           
 String getUsername()
           
 String serialize()
          convert object to String
static String[] toRole(Object oRoles)
          convert a Object to a String Array of Roles
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CredentialImpl

public CredentialImpl(String username,
                      Resource rolesDir)
credential constructor

Parameters:
username -

CredentialImpl

public CredentialImpl(String username,
                      String password,
                      Resource rolesDir)
credential constructor

Parameters:
username -
password -

CredentialImpl

public CredentialImpl(String username,
                      String password,
                      String roles,
                      Resource rolesDir)
               throws PageException
credential constructor

Parameters:
username -
password -
roles -
Throws:
PageException

CredentialImpl

public CredentialImpl(String username,
                      String password,
                      Array roles,
                      Resource rolesDir)
               throws PageException
credential constructor

Parameters:
username -
password -
roles -
Throws:
PageException

CredentialImpl

public CredentialImpl(String username,
                      String password,
                      String[] roles,
                      Resource rolesDir)
credential constructor

Parameters:
username -
password -
roles -
Method Detail

getPassword

public String getPassword()
Specified by:
getPassword in interface Credential
Returns:
Returns the password.
See Also:
Credential.getPassword()

getRoles

public String[] getRoles()
Specified by:
getRoles in interface Credential
Returns:
Returns the roles.
See Also:
Credential.getRoles()

getUsername

public String getUsername()
Specified by:
getUsername in interface Credential
Returns:
Returns the username.
See Also:
Credential.getUsername()

toRole

public static String[] toRole(Object oRoles)
                       throws PageException
convert a Object to a String Array of Roles

Parameters:
oRoles -
Returns:
roles
Throws:
PageException

serialize

public String serialize()
Description copied from interface: ScriptConvertable
convert object to String

Specified by:
serialize in interface ScriptConvertable
Returns:
serialized Object
See Also:
ScriptConvertable.serialize()

encode

public String encode()
              throws PageException
Description copied from interface: Credential
encode rhe Credential to a Base64 String value

Specified by:
encode in interface Credential
Returns:
base64 encoded string
Throws:
PageException
See Also:
Credential.encode()

decode

public static Credential decode(Object encoded,
                                Resource rolesDir)
                         throws PageException
decode the Credential form a Base64 String value

Parameters:
encoded -
Returns:
Credential from decoded string
Throws:
PageException

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2012 Railo