com.caucho.cloud.security
Class SecurityService

java.lang.Object
  extended by com.caucho.env.service.AbstractResinSubSystem
      extended by com.caucho.cloud.security.SecurityService
All Implemented Interfaces:
ResinSubSystem

public class SecurityService
extends AbstractResinSubSystem


Field Summary
static int START_PRIORITY
           
 
Fields inherited from interface com.caucho.env.service.ResinSubSystem
START_PRIORITY_CACHE_SERVICE, START_PRIORITY_CLASSLOADER, START_PRIORITY_CLUSTER_SERVICE, START_PRIORITY_DEFAULT, START_PRIORITY_ENV_SYSTEM, START_PRIORITY_NETWORK_CLUSTER
 
Constructor Summary
SecurityService()
           
 
Method Summary
static SecurityService createAndAddService()
           
 DigestCredentials createCredentials(java.lang.String algorithm, java.lang.String user, java.lang.String password, java.lang.String nonce)
           
 byte[] createDigest(java.lang.String user, java.lang.String password, java.lang.String nonce)
           
 java.lang.String getAlgorithm(java.lang.String uid)
           
 Authenticator getAuthenticator()
           
static SecurityService getCurrent()
           
 int getStartPriority()
          Returns the start priority of the service, used to determine which services to start first.
 boolean isSystemAuthKey()
           
 void setAuthenticator(Authenticator auth)
           
 void setSignatureSecret(java.lang.String secret)
           
 byte[] sign(byte[] data)
           
 java.lang.String sign(java.lang.String algorithm, java.lang.String uid, java.lang.String password, java.lang.String nonce)
           
 java.lang.String signSystem(java.lang.String uid, java.lang.String nonce)
           
 void start()
          Starts the service.
 
Methods inherited from class com.caucho.env.service.AbstractResinSubSystem
destroy, getStopPriority, preCreate, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

START_PRIORITY

public static final int START_PRIORITY
See Also:
Constant Field Values
Constructor Detail

SecurityService

public SecurityService()
Method Detail

createAndAddService

public static SecurityService createAndAddService()

getCurrent

public static SecurityService getCurrent()

setSignatureSecret

public void setSignatureSecret(java.lang.String secret)

isSystemAuthKey

public boolean isSystemAuthKey()

setAuthenticator

public void setAuthenticator(Authenticator auth)

getAuthenticator

public Authenticator getAuthenticator()

getAlgorithm

public java.lang.String getAlgorithm(java.lang.String uid)

signSystem

public java.lang.String signSystem(java.lang.String uid,
                                   java.lang.String nonce)

sign

public java.lang.String sign(java.lang.String algorithm,
                             java.lang.String uid,
                             java.lang.String password,
                             java.lang.String nonce)

sign

public byte[] sign(byte[] data)

createCredentials

public DigestCredentials createCredentials(java.lang.String algorithm,
                                           java.lang.String user,
                                           java.lang.String password,
                                           java.lang.String nonce)

createDigest

public byte[] createDigest(java.lang.String user,
                           java.lang.String password,
                           java.lang.String nonce)

getStartPriority

public int getStartPriority()
Description copied from interface: ResinSubSystem
Returns the start priority of the service, used to determine which services to start first.

Specified by:
getStartPriority in interface ResinSubSystem
Overrides:
getStartPriority in class AbstractResinSubSystem

start

public void start()
Description copied from interface: ResinSubSystem
Starts the service.

Specified by:
start in interface ResinSubSystem
Overrides:
start in class AbstractResinSubSystem