org.apache.jetspeed.sso
Interface SSOProvider


public interface SSOProvider

Utility component to handle SSO requests

Author:
Roger Ruttimann

Method Summary
 void addCredentialsForSite(SSOSite ssoSite, javax.security.auth.Subject subject, java.lang.String remoteUser, java.lang.String pwd)
          Add credentials inside a transaction using existing ssoSite
 void addCredentialsForSite(java.lang.String fullPath, java.lang.String remoteUser, java.lang.String site, java.lang.String pwd)
          addCredentialsForSite()
 void addCredentialsForSite(javax.security.auth.Subject subject, java.lang.String remoteUser, java.lang.String site, java.lang.String pwd)
           
 void addSite(java.lang.String siteName, java.lang.String siteUrl)
           
 void addSiteChallengeResponse(java.lang.String siteName, java.lang.String siteUrl, java.lang.String realm)
          Add a new site that uses Challenge / Response Authentication
 void addSiteFormAuthenticated(java.lang.String siteName, java.lang.String siteUrl, java.lang.String realm, java.lang.String userField, java.lang.String pwdField)
          Add a new site that uses Form Authentication
 java.util.Collection getCookiesForUser(java.lang.String fullPath)
          Retrive cookies for an user by User full path
 java.util.Collection getCookiesForUser(javax.security.auth.Subject user)
          Retrive Cookies by Subject
 SSOContext getCredentials(javax.security.auth.Subject subject, java.lang.String site)
           
 java.util.List getPrincipalsForSite(SSOSite site)
          return a list of SSOContext objects containing both the portal principal, remote principal, and credentials
 java.lang.String getRealmForSite(java.lang.String site)
           
 SSOSite getSite(java.lang.String siteUrl)
           
 java.lang.String getSiteName(java.lang.String site)
           
 java.util.Iterator getSites(java.lang.String filter)
           
 java.util.Collection getSitesForPrincipal(java.lang.String userId)
          Get all SSOSites that the principal has access to
 java.lang.String getSiteURL(java.lang.String site)
           
 boolean hasSSOCredentials(javax.security.auth.Subject subject, java.lang.String site)
          Public API's for SSO functinality
 void removeCredentialsForSite(java.lang.String fullPath, java.lang.String site)
          removeCredentialsForSite()
 void removeCredentialsForSite(javax.security.auth.Subject subject, java.lang.String site)
           
 void removeSite(SSOSite site)
           
 void setRealmForSite(java.lang.String site, java.lang.String realm)
           
 void updateCredentialsForSite(javax.security.auth.Subject subject, java.lang.String remoteUser, java.lang.String site, java.lang.String pwd)
           
 void updateSite(SSOSite site)
           
 java.lang.String useSSO(SSOUser user, java.lang.String url, java.lang.String SSOSite, boolean bRefresh)
          This method first authenticates the the SSOSite and then forwards the request to the destination URL.
 java.lang.String useSSO(javax.security.auth.Subject subject, java.lang.String url, boolean bRefresh)
          Same as the method above except that the user will be authenticated against all SSOSites defined for the user before going to the destination site.
 

Method Detail

useSSO

java.lang.String useSSO(SSOUser user,
                        java.lang.String url,
                        java.lang.String SSOSite,
                        boolean bRefresh)
                        throws SSOException
This method first authenticates the the SSOSite and then forwards the request to the destination URL. The content will be returned as a string. If the SSOSite and the url match only one call will be executed since the authentication will be done while getting the result page.

Parameters:
userID -
url -
SSOSite -
bRefresh - if true it refreshes the proxy connection if false a cached proxy will be used
Returns:
Throws:
SSOException

useSSO

java.lang.String useSSO(javax.security.auth.Subject subject,
                        java.lang.String url,
                        boolean bRefresh)
                        throws SSOException
Same as the method above except that the user will be authenticated against all SSOSites defined for the user before going to the destination site.

Parameters:
userID -
url -
bRefresh - if true it refreshes the proxy connection if false a cached proxy will be used
Returns:
Throws:
SSOException

getCookiesForUser

java.util.Collection getCookiesForUser(java.lang.String fullPath)
Retrive cookies for an user by User full path

Parameters:
fullPath -
Returns:

getCookiesForUser

java.util.Collection getCookiesForUser(javax.security.auth.Subject user)
Retrive Cookies by Subject

Parameters:
user -
Returns:

hasSSOCredentials

boolean hasSSOCredentials(javax.security.auth.Subject subject,
                          java.lang.String site)
Public API's for SSO functinality

Returns:

getCredentials

SSOContext getCredentials(javax.security.auth.Subject subject,
                          java.lang.String site)
                          throws SSOException
Throws:
SSOException

addCredentialsForSite

void addCredentialsForSite(javax.security.auth.Subject subject,
                           java.lang.String remoteUser,
                           java.lang.String site,
                           java.lang.String pwd)
                           throws SSOException
Throws:
SSOException

updateCredentialsForSite

void updateCredentialsForSite(javax.security.auth.Subject subject,
                              java.lang.String remoteUser,
                              java.lang.String site,
                              java.lang.String pwd)
                              throws SSOException
Throws:
SSOException

removeCredentialsForSite

void removeCredentialsForSite(javax.security.auth.Subject subject,
                              java.lang.String site)
                              throws SSOException
Throws:
SSOException

getPrincipalsForSite

java.util.List getPrincipalsForSite(SSOSite site)
return a list of SSOContext objects containing both the portal principal, remote principal, and credentials

Parameters:
site -
Returns:
list SSOContext objects

getSites

java.util.Iterator getSites(java.lang.String filter)

getSite

SSOSite getSite(java.lang.String siteUrl)

updateSite

void updateSite(SSOSite site)
                throws SSOException
Throws:
SSOException

addSite

void addSite(java.lang.String siteName,
             java.lang.String siteUrl)
             throws SSOException
Throws:
SSOException

removeSite

void removeSite(SSOSite site)
                throws SSOException
Throws:
SSOException

addCredentialsForSite

void addCredentialsForSite(java.lang.String fullPath,
                           java.lang.String remoteUser,
                           java.lang.String site,
                           java.lang.String pwd)
                           throws SSOException
addCredentialsForSite()

Parameters:
fullPath -
remoteUser -
site -
pwd -
Throws:
SSOException

addCredentialsForSite

void addCredentialsForSite(SSOSite ssoSite,
                           javax.security.auth.Subject subject,
                           java.lang.String remoteUser,
                           java.lang.String pwd)
                           throws SSOException
Add credentials inside a transaction using existing ssoSite

Parameters:
ssoSite -
subject -
remoteUser -
pwd -
Throws:
SSOException

removeCredentialsForSite

void removeCredentialsForSite(java.lang.String fullPath,
                              java.lang.String site)
                              throws SSOException
removeCredentialsForSite()

Parameters:
fullPath -
site -
Throws:
SSOException

getSiteURL

java.lang.String getSiteURL(java.lang.String site)

getSiteName

java.lang.String getSiteName(java.lang.String site)

setRealmForSite

void setRealmForSite(java.lang.String site,
                     java.lang.String realm)
                     throws SSOException
Throws:
SSOException

getRealmForSite

java.lang.String getRealmForSite(java.lang.String site)
                                 throws SSOException
Throws:
SSOException

getSitesForPrincipal

java.util.Collection getSitesForPrincipal(java.lang.String userId)
Get all SSOSites that the principal has access to

Parameters:
userId -
Returns:

addSiteChallengeResponse

void addSiteChallengeResponse(java.lang.String siteName,
                              java.lang.String siteUrl,
                              java.lang.String realm)
                              throws SSOException
Add a new site that uses Challenge / Response Authentication

Parameters:
siteName -
siteUrl -
realm -
Throws:
SSOException

addSiteFormAuthenticated

void addSiteFormAuthenticated(java.lang.String siteName,
                              java.lang.String siteUrl,
                              java.lang.String realm,
                              java.lang.String userField,
                              java.lang.String pwdField)
                              throws SSOException
Add a new site that uses Form Authentication

Parameters:
siteName -
siteUrl -
realm -
userField -
pwdField -
Throws:
SSOException


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