org.apache.jetspeed.sso
Interface SSOUserManager

All Known Subinterfaces:
SSOManager

public interface SSOUserManager

Version:
$Id: SSOUserManager.java 734954 2009-01-16 10:07:13Z ddam $
Author:
Dennis Dam

Method Summary
 void addAssociation(SSOUser user, JetspeedPrincipal principal)
          Adds an association between a SSO user and a Portal principal.
 SSOUser addUser(SSOSite site, JetspeedPrincipal ownerPrincipal, java.lang.String ssoUsername, java.lang.String ssoUserPassword)
          Adds a SSO user within the given SSO site.
 PasswordCredential getCredentials(SSOUser user)
          Retrieves the credentials for a SSO user
 java.util.Collection<JetspeedPrincipal> getPortalPrincipals(SSOUser user)
          Retrieves all Portal ("local") Principals connected to a given SSO User
 SSOUser getRemoteUser(SSOSite site, java.lang.String remoteUserName)
          Retrieves a single SSO user, given the SSO user's site and name
 java.util.Collection<SSOUser> getRemoteUsers(SSOSite site, JetspeedPrincipal portalPrincipal)
          Retrieves all SSO users related to the Portal principal, for the given site.
 java.util.Collection<SSOUser> getRemoteUsers(SSOSite site, javax.security.auth.Subject subject)
          Retrieves all SSO Users related to this subject, for the given site.
 java.util.Collection<SSOUser> getUsersForSite(SSOSite site)
          Retrieves all SSO users which belong to a SSO site
 void removeUser(SSOUser remoteUser)
          Removes the given SSO user
 void setPassword(SSOUser user, java.lang.String password)
          Sets the password for a given SSO user
 void updateUser(SSOUser user)
          Updates a SSO user
 

Method Detail

getRemoteUser

SSOUser getRemoteUser(SSOSite site,
                      java.lang.String remoteUserName)
Retrieves a single SSO user, given the SSO user's site and name

Parameters:
site - The SSO Site
remoteUserName - the name of the SSO user
Returns:
the SSO user

getPortalPrincipals

java.util.Collection<JetspeedPrincipal> getPortalPrincipals(SSOUser user)
Retrieves all Portal ("local") Principals connected to a given SSO User

Parameters:
user - the SSO user
Returns:
Portal principals

getRemoteUsers

java.util.Collection<SSOUser> getRemoteUsers(SSOSite site,
                                             javax.security.auth.Subject subject)
                                             throws SSOException
Retrieves all SSO Users related to this subject, for the given site. A subject can contain multiple Portal Principals, each of which can be related to multiple SSO users. The result of calling this method would be the same as calling getRemoteUsers(SSOSite site, JetspeedPrincipal portalPrincipal) for every principal in the subject, and aggregating all the SSO users in one collection.

Parameters:
site - the SSO Site for which to fetch the SSO users
subject -
Returns:
the collection of SSO users
Throws:
SSOException

getRemoteUsers

java.util.Collection<SSOUser> getRemoteUsers(SSOSite site,
                                             JetspeedPrincipal portalPrincipal)
                                             throws SSOException
Retrieves all SSO users related to the Portal principal, for the given site.

Parameters:
site - the SSO Site
portalPrincipal - a Portal principal
Returns:
a collection of SSO users
Throws:
SSOException

getCredentials

PasswordCredential getCredentials(SSOUser user)
                                  throws SSOException
Retrieves the credentials for a SSO user

Parameters:
user - the SSO user for which to return the credential
Returns:
the SSO user's credential
Throws:
SSOException

getUsersForSite

java.util.Collection<SSOUser> getUsersForSite(SSOSite site)
                                              throws SSOException
Retrieves all SSO users which belong to a SSO site

Parameters:
site -
Returns:
the site's SSO users
Throws:
SSOException

removeUser

void removeUser(SSOUser remoteUser)
                throws SSOException
Removes the given SSO user

Parameters:
remoteUser - the SSO user to be removed
Throws:
SSOException

addUser

SSOUser addUser(SSOSite site,
                JetspeedPrincipal ownerPrincipal,
                java.lang.String ssoUsername,
                java.lang.String ssoUserPassword)
                throws SSOException
Adds a SSO user within the given SSO site. Each SSO user is 'owned' by exactly one portal principal called the 'owner principal'. The owner principal will have two associations with the new SSO user: an owner relationship and a usage relationship.

Parameters:
site - the SSO site for which to add the new user
ownerPrincipal - the owner Portal principal
ssoUsername - the name of the new user
ssoUserPassword - the password of the new user
Returns:
the new SSO user
Throws:
SSOException

updateUser

void updateUser(SSOUser user)
                throws SSOException
Updates a SSO user

Parameters:
user - the SSO user to be updated
Throws:
SSOException

addAssociation

void addAssociation(SSOUser user,
                    JetspeedPrincipal principal)
                    throws SSOException
Adds an association between a SSO user and a Portal principal. This will allow the portal principal to 'use' the SSO user to navigate the SSO site.

Parameters:
user - a SSO user
principal - a Portal principal
Throws:
SSOException

setPassword

void setPassword(SSOUser user,
                 java.lang.String password)
                 throws SSOException
Sets the password for a given SSO user

Parameters:
user - the SSO user for which to set the password
password - the new password
Throws:
SSOException


Copyright © 1999-2011 The Apache Software Foundation. All Rights Reserved.