org.jboss.security.plugins
Class DefaultLoginConfig

java.lang.Object
  extended byorg.jboss.security.plugins.DefaultLoginConfig
All Implemented Interfaces:
DynamicMBean (src)

public class DefaultLoginConfig
extends java.lang.Object
implements DynamicMBean (src)

An mbean that uses the default JAAS login configuration file based implementation.


Constructor Summary
DefaultLoginConfig()
          Creates a new instance of DefaultLoginConfig
 
Method Summary
 java.lang.Object getAttribute(java.lang.String name)
          Returns the value of the attribute with the name matching the passed string.
 AttributeList (src) getAttributes(java.lang.String[] names)
          Returns the values of the attributes with names matching the passed string array.
 java.lang.String getAuthConfig()
          Get the resource path to the JAAS login configuration file to use.
 javax.security.auth.login.Configuration getConfiguration(javax.security.auth.login.Configuration currentConfig)
          Return the Configuration instance managed by this mbean.
 MBeanInfo (src) getMBeanInfo()
          Returns the management interface that describes this dynamic resource.
 java.lang.Object invoke(java.lang.String method, java.lang.Object[] args, java.lang.String[] signature)
          Invokes a resource operation.
 void setAttribute(Attribute (src)  attribute)
          Sets the value of an attribute.
 AttributeList (src) setAttributes(AttributeList (src)  attributeList)
          Sets the values of the attributes passed as an AttributeList (src) of name and new value pairs.
 void setAuthConfig(java.lang.String authConfURL)
          Set the resource path or URL to the JAAS login configuration file to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLoginConfig

public DefaultLoginConfig()
Creates a new instance of DefaultLoginConfig

Method Detail

getAuthConfig

public java.lang.String getAuthConfig()
Get the resource path to the JAAS login configuration file to use.


setAuthConfig

public void setAuthConfig(java.lang.String authConfURL)
                   throws java.net.MalformedURLException
Set the resource path or URL to the JAAS login configuration file to use. The default is "auth.conf".

Throws:
java.net.MalformedURLException

getConfiguration

public javax.security.auth.login.Configuration getConfiguration(javax.security.auth.login.Configuration currentConfig)
Return the Configuration instance managed by this mbean. This simply obtains the default Configuration by calling Configuration.getConfiguration. Note that this means this mbean must be the first pushed onto the config stack if it is used.

See Also:
Configuration

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
                              throws AttributeNotFoundException (src) ,
                                     MBeanException (src) ,
                                     ReflectionException (src) 
Description copied from interface: DynamicMBean (src)
Returns the value of the attribute with the name matching the passed string.

Specified by:
getAttribute in interface DynamicMBean (src)
Parameters:
name - the name of the attribute.
Returns:
the value of the attribute.
Throws:
MBeanException (src) - wraps any error thrown by the resource when getting the attribute.
AttributeNotFoundException (src) - when there is no such attribute.
ReflectionException (src) - wraps any error invoking the resource.

getAttributes

public AttributeList (src)  getAttributes(java.lang.String[] names)
Description copied from interface: DynamicMBean (src)
Returns the values of the attributes with names matching the passed string array.

Specified by:
getAttributes in interface DynamicMBean (src)
Parameters:
names - the names of the attribute.
Returns:
an AttributeList (src) of name and value pairs.

getMBeanInfo

public MBeanInfo (src)  getMBeanInfo()
Description copied from interface: DynamicMBean (src)
Returns the management interface that describes this dynamic resource. It is the responsibility of the implementation to make sure the description is accurate.

Specified by:
getMBeanInfo in interface DynamicMBean (src)
Returns:
the management interface.

invoke

public java.lang.Object invoke(java.lang.String method,
                               java.lang.Object[] args,
                               java.lang.String[] signature)
                        throws MBeanException (src) ,
                               ReflectionException (src) 
Description copied from interface: DynamicMBean (src)
Invokes a resource operation.

Specified by:
invoke in interface DynamicMBean (src)
Parameters:
method - the name of the operation to perform.
args - the parameters to pass to the operation.
signature - the signartures of the parameters.
Returns:
the result of the operation.
Throws:
MBeanException (src) - wraps any error thrown by the resource when performing the operation.
ReflectionException (src) - wraps any error invoking the resource.

setAttribute

public void setAttribute(Attribute (src)  attribute)
                  throws AttributeNotFoundException (src) ,
                         InvalidAttributeValueException (src) ,
                         MBeanException (src) ,
                         ReflectionException (src) 
Description copied from interface: DynamicMBean (src)
Sets the value of an attribute. The attribute and new value are passed in the name value pair Attribute (src) .

Specified by:
setAttribute in interface DynamicMBean (src)
Parameters:
attribute - the name and new value of the attribute.
Throws:
InvalidAttributeValueException (src) - when the new value cannot be converted to the type of the attribute.
AttributeNotFoundException (src) - when there is no such attribute.
MBeanException (src) - wraps any error thrown by the resource when setting the new value.
ReflectionException (src) - wraps any error invoking the resource.
See Also:
Attribute (src)

setAttributes

public AttributeList (src)  setAttributes(AttributeList (src)  attributeList)
Description copied from interface: DynamicMBean (src)
Sets the values of the attributes passed as an AttributeList (src) of name and new value pairs.

Specified by:
setAttributes in interface DynamicMBean (src)
Parameters:
attributeList - the name an new value pairs.
Returns:
an AttributeList (src) of name and value pairs that were actually set.