org.jdesktop.wonderland.common.login
Interface AuthenticationService

All Superinterfaces:
CredentialManager

public interface AuthenticationService
extends CredentialManager

An interface for working with an authentication service. Typically, the authentication service will be a restful web service that performs authentication, lookup and token validation.

An authentication service manages credentials for connecting to a particular authentication source. The authentication manager is used to manage AuthenticationServices for different sources.

AuthenticationService provides an implementation of CredentialManager, a more general API for different authentication sources.

Author:
jkaplan

Method Summary
 javax.naming.directory.Attributes getAttributes(java.lang.String token, java.lang.String... attributeNames)
          Get all attributes for the given token.
 java.lang.String getCookieName()
          Get the name of the authentication cookie
 boolean isTokenValid()
          Determine if the token is valid.
 boolean isTokenValid(java.lang.String token)
          Determine if the given token is valid
 void logout()
          Log the current user out of the system
 javax.naming.directory.Attributes read(java.lang.String userId, java.lang.String... attributeNames)
          Get all attributes for the user with the given user id.
 
Methods inherited from interface org.jdesktop.wonderland.common.login.CredentialManager
getAuthenticationToken, getAuthenticationURL, getUsername, secureURLConnection
 

Method Detail

isTokenValid

boolean isTokenValid()
                     throws AuthenticationException
Determine if the token is valid. Identical to calling isTokenValid(getAuthenticationToken())

Returns:
true if the token for this service is valid, or false if not
Throws:
AuthenticationException

isTokenValid

boolean isTokenValid(java.lang.String token)
                     throws AuthenticationException
Determine if the given token is valid

Parameters:
token - the token to check
Returns:
true if the token is valid, or false if not
Throws:
AuthenticationException

getCookieName

java.lang.String getCookieName()
                               throws AuthenticationException
Get the name of the authentication cookie

Returns:
the name of the authentication cookie
Throws:
AuthenticationException

getAttributes

javax.naming.directory.Attributes getAttributes(java.lang.String token,
                                                java.lang.String... attributeNames)
                                                throws AuthenticationException
Get all attributes for the given token.

Parameters:
token - the token to get attributes for
Returns:
the attributes for this user
Throws:
AuthenticationException

read

javax.naming.directory.Attributes read(java.lang.String userId,
                                       java.lang.String... attributeNames)
                                       throws AuthenticationException
Get all attributes for the user with the given user id. The current user must be an administrator for this function to work

Parameters:
userId - the userId to get attributes for
Returns:
the attributes for the given user
Throws:
AuthenticationException

logout

void logout()
            throws AuthenticationException
Log the current user out of the system

Throws:
AuthenticationException


Open Wonderland - http://openwonderland.org