com.sun.sgs.auth
Interface IdentityAuthenticator

All Known Implementing Classes:
NamePasswordAuthenticator, NullAuthenticator

public interface IdentityAuthenticator

This interface is used to define modules that know how to authenticate an identity based on provided credentials. The credentials must be of a form recognizable to the implementation. Note that each application context has its own instances of IdentityAuthenticators. Typically implementations of IdentityAuthenticator are invoked by a containing IdentityManager.

All implementations of IdentityAuthenticator must have a constructor that accepts an instance of java.util.Properties. The provided properties are part of the application's configuration.

FIXME: When the IO interfaces are ready, these should also be provided to the constructor.


Method Summary
 Identity authenticateIdentity(IdentityCredentials credentials)
          Authenticates the given credentials.
 String[] getSupportedCredentialTypes()
          Returns the identifiers for this IdentityAuthenticator's supported credential types.
 

Method Detail

getSupportedCredentialTypes

String[] getSupportedCredentialTypes()
Returns the identifiers for this IdentityAuthenticator's supported credential types. This may contain any number of identifiers, which are matched against the identifier of IdentityCredentials to determine if this IdentityAuthenticator can consume those credentials.

Returns:
the identifiers for the supported credential types

authenticateIdentity

Identity authenticateIdentity(IdentityCredentials credentials)
                              throws LoginException
Authenticates the given credentials. The returned Identity is valid, but has not yet been notified as logged in.

Parameters:
credentials - the IdentityCredentials to authenticate
Returns:
an authenticated Identity
Throws:
LoginException - if authentication fails

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved