org.jdesktop.wonderland.common.login
Interface CredentialManager

All Known Subinterfaces:
AuthenticationService

public interface CredentialManager

Manages credentials for connecting to a particular authentication source. The CredentialManager typically maps from the URL of an authentication server to the authentication tokens identifying the user on that server.

In addition to returning the actual authentication token, the credential manager can be used to update an HttpURLConnection with the necessary cookies to identify this user to the given server.

Author:
jkaplan

Method Summary
 java.lang.String getAuthenticationToken()
          Get the authentication token for this server
 java.lang.String getAuthenticationURL()
          Get the URL of the credential server.
 java.lang.String getUsername()
          Get the username this user is connected as
 void secureURLConnection(java.net.HttpURLConnection conn)
          Given an HttpURLConnection to a source using this credential manager, add in the necessary cookies for recognizing this request.
 

Method Detail

getAuthenticationURL

java.lang.String getAuthenticationURL()
Get the URL of the credential server. Note this may be different than the URL of the Wonderland web server, for example if the Authentication server is an external instance of OpenSSO.

Returns:
the authentication server URL. This is the baseURL where all authentication actions can be taken.

getUsername

java.lang.String getUsername()
Get the username this user is connected as

Returns:
the user name

getAuthenticationToken

java.lang.String getAuthenticationToken()
Get the authentication token for this server

Returns:
the authentication token

secureURLConnection

void secureURLConnection(java.net.HttpURLConnection conn)
Given an HttpURLConnection to a source using this credential manager, add in the necessary cookies for recognizing this request.

Parameters:
conn - the connection to add cookies to


Open Wonderland - http://openwonderland.org