com.arsdigita.kernel.security
Class URLManager

java.lang.Object
  extended bycom.arsdigita.kernel.security.CredentialManager
      extended bycom.arsdigita.kernel.security.URLManager

public class URLManager
extends CredentialManager

Manages a string value stored in a URL parameter.

Author:
Sameer Ajmani
See Also:
URLLoginModule

Field Summary
static String versionId
           
 
Constructor Summary
URLManager(Set models)
          Creates a URLManager that manages the URL parameters specified by the given set of bebop StringParameters.
 
Method Summary
protected  void deleteValue()
          Removes all public credentials in this Subject that are ParameterData with name getModule().getCredentialName().
protected  String getValue()
          Extracts the parameter named getModule().getCredentialName() from the current HTTP request.
 void initialize(CredentialLoginModule module, javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler handler, Map shared, Map options)
          Adds the StringParameters provided in the constructor to the Subject's set of public credentials.
protected  void setValue(String value)
          Adds a URL parameter that authenticates the user to this Subject's public credentials.
protected  boolean shouldSetValue(String value)
          Ensures that setValue() is called for every commit.
 
Methods inherited from class com.arsdigita.kernel.security.CredentialManager
getModule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

URLManager

public URLManager(Set models)
Creates a URLManager that manages the URL parameters specified by the given set of bebop StringParameters.

Parameters:
models - a set of bebop StringParameters
Method Detail

initialize

public void initialize(CredentialLoginModule module,
                       javax.security.auth.Subject subject,
                       javax.security.auth.callback.CallbackHandler handler,
                       Map shared,
                       Map options)
Adds the StringParameters provided in the constructor to the Subject's set of public credentials. Allows the calling code to determine what URL parameters might be set by this URLManager.

Overrides:
initialize in class CredentialManager
Parameters:
module - the CredentialLoginModule associated with this CredentialManager.

shouldSetValue

protected boolean shouldSetValue(String value)
                          throws javax.security.auth.login.LoginException
Ensures that setValue() is called for every commit.

Specified by:
shouldSetValue in class CredentialManager
Parameters:
value - the new value for the credential
Returns:
true.
Throws:
javax.security.auth.login.LoginException - if an error occurs.

getValue

protected final String getValue()
                         throws javax.security.auth.login.LoginException
Extracts the parameter named getModule().getCredentialName() from the current HTTP request.

Specified by:
getValue in class CredentialManager
Returns:
the value of the URL parameter.
Throws:
javax.security.auth.login.LoginException - if an error occurs.

setValue

protected final void setValue(String value)
                       throws javax.security.auth.login.LoginException
Adds a URL parameter that authenticates the user to this Subject's public credentials. The URL paramater is a bebop ParameterData whose ParameterModel is one of the models provided in the constructor.

Specified by:
setValue in class CredentialManager
Parameters:
value - the new value for the credential
Throws:
javax.security.auth.login.LoginException - if an error occurs.

deleteValue

protected final void deleteValue()
                          throws javax.security.auth.login.LoginException
Removes all public credentials in this Subject that are ParameterData with name getModule().getCredentialName().

Specified by:
deleteValue in class CredentialManager
Throws:
javax.security.auth.login.LoginException - if an error occurs.


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC