Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.security
Interface AuthenticationManager

All Known Subinterfaces:
  SecurityDomain, SubjectSecurityManager

All Known Implementing Classes:
  NoAccessSecurityManager, NullSecurityManager

public interface AuthenticationManager

The SecurityManager is responsible for validating credentials associated with principals.

Version:
  $Revision: 1.3 $
Author:
  Scott.Stark@jboss.org

Method Summary
`Subject` | `getActiveSubject()` Get the currently authenticated subject.
`String` | `getSecurityDomain()` Get the security domain from which the security manager is from.
`boolean` | `isValid(Principal principal, Object credential)` The isValid method is invoked to see if a user identity and associated credentials as known in the operational environment are valid proof of the user identity.
`boolean` | `isValid(Principal principal, Object credential, Subject activeSubject)` The isValid method is invoked to see if a user identity and associated credentials as known in the operational environment are valid proof of the user identity.

Method Detail

### getSecurityDomain

    public String getSecurityDomain()

  Get the security domain from which the security manager is from. Every security manager belongs to a named domain. The meaning of the security domain name depends on the implementation. Examples range from as fine grained as the name of EJBs to J2EE application names to DNS domain names.

  Returns:
    the security domain name. May be null in which case the security manager belongs to the logical default domain.

### isValid

    public boolean isValid(Principal principal,
                           Object credential)

  The isValid method is invoked to see if a user identity and associated credentials as known in the operational environment are valid proof of the user identity.

  Parameters:
    `principal` - - the user identity in the operation environment
    `credential` - - the proof of user identity as known in the operation environment
  Returns:
    true if the principal, credential pair is valid, false otherwise.

### isValid

    public boolean isValid(Principal principal,
                           Object credential,
                           Subject activeSubject)

  The isValid method is invoked to see if a user identity and associated credentials as known in the operational environment are valid proof of the user identity. This extends AuthenticationManager version to provide a copy of the resulting authenticated Subject. This allows a caller to authenticate a user and obtain a Subject whose state cannot be modified by other threads associated with the same principal.

  Parameters:
    `principal` - - the user identity in the operation environment
    `credential` - - the proof of user identity as known in the operation environment
  Returns:
    true if the principal, credential pair is valid, false otherwise.

### getActiveSubject

    public Subject getActiveSubject()

  Get the currently authenticated subject. After a successful isValid() call, a SubjectSecurityManager has a Subject associated with the current thread. This Subject will typically contain the Principal passed to isValid as well as any number of additional Principals, and credentials. Note that although the Subject is local to the thread, its internal state may not be if there are multiple threads for the same principal active.

  Returns:
    The previously authenticated Subject if isValid succeeded, null if isValid failed or has not been called for the active thread.
  See Also:
    `isValid(java.security.Principal, Object)`, `isValid(java.security.Principal, Object, javax.security.auth.Subject)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.