com.atlassian.crowd.openid.server.action.secure.interaction
Class AllowAuthentication

java.lang.Object
  extended by com.opensymphony.xwork.ActionSupport
      extended by com.atlassian.crowd.openid.server.action.BaseAction
          extended by com.atlassian.crowd.openid.server.action.secure.interaction.AllowAuthentication
All Implemented Interfaces:
com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware, com.uwyn.rife.continuations.ContinuableObject, java.io.Serializable, java.lang.Cloneable

public class AllowAuthentication
extends BaseAction

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.atlassian.crowd.openid.server.action.BaseAction
actionMessageAlertColor, ALERT_BLUE, ALERT_RED, ALERT_YELLOW, authenticated, isAdministrator, openIDAuthenticationManager, openIDPropertyManager, profileManager, siteManager, userManager
 
Fields inherited from class com.opensymphony.xwork.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
AllowAuthentication()
           
 
Method Summary
 java.lang.String doAllow()
          Allow OpenID authentication to a client site (RP).
 java.lang.String doAllowAlways()
          Always allow OpenID authentication to a client site (RP).
 java.lang.String doDefault()
          Display the Allow/Disallow authentication screen.
 java.lang.String doDeny()
          Deny OpenID authentication to a client site (RP).
 Profile getCurrentProfile()
           
 java.lang.String getIdentifier()
           
protected  OpenIDAuthRequest getOpenIDAuthRequest()
          Retrieve the OpenIDAuthRequest from session.
 java.util.Collection getOptionalAttributes()
           
 ProfileAttributesHelper getProfileAttributesHelper()
           
 long getProfileID()
           
 java.lang.String getRequestingSite()
           
 java.util.Collection getRequiredAttributes()
           
 SREGAttributes getSregAttributes()
           
 User getUser()
           
protected  void removeOpenIDAuthRequest()
          Removes the OpenIDAuthRequest from session.
 void setCurrentProfile(Profile currentProfile)
           
 void setIdentifier(java.lang.String identifier)
           
protected  void setOpenIDAuthResponse(OpenIDAuthResponse authResp)
          Set the OpenIDAuthResponse into the request attributes.
 void setOptionalAttributes(java.util.Collection optionalAttributes)
           
 void setProfileAttributesHelper(ProfileAttributesHelper profileAttributesHelper)
           
 void setProfileID(long profileID)
           
 void setRequestingSite(java.lang.String requestingSite)
           
 void setRequiredAttributes(java.util.Collection requiredAttributes)
           
 void setSregAttributes(SREGAttributes sregAttributes)
           
 void setUser(User user)
           
 
Methods inherited from class com.atlassian.crowd.openid.server.action.BaseAction
addActionMessage, containsActionMessages, getActionMessageAlertColor, getAttribute, getBaseURL, getFirstAttribute, getHttpAuthenticator, getHttpReqest, getPrincipalName, getRemotePrincipal, getRequest, getSecurityServerClient, getSession, isAdministrator, isAuthenticated, lookupDomainName, setHttpAuthenticator, setOpenIDAuthenticationManager, setProfileManager, setPropertyManager, setSecurityServerClient, setSiteManager, setUserManager
 
Methods inherited from class com.opensymphony.xwork.ActionSupport
addActionError, addActionMessage, addFieldError, clearErrorsAndMessages, clone, doInput, execute, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, pause, setActionErrors, setActionMessages, setFieldErrors, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllowAuthentication

public AllowAuthentication()
Method Detail

getOpenIDAuthRequest

protected OpenIDAuthRequest getOpenIDAuthRequest()
Retrieve the OpenIDAuthRequest from session. This should be put in session by the CrowdProvider.

Returns:
OpenIDAuthRequest from session, or null if it hasn't been set.

removeOpenIDAuthRequest

protected void removeOpenIDAuthRequest()
Removes the OpenIDAuthRequest from session. This is used when an error occurs with the processing the request, and the app needs to forget about the old auth request.


setOpenIDAuthResponse

protected void setOpenIDAuthResponse(OpenIDAuthResponse authResp)
Set the OpenIDAuthResponse into the request attributes. This should be called before a "SUCCESS" is returned from this action, as this object is expected by the OpenIDServerServlet.

Parameters:
authResp - OpenIDAuthResponse, should not be null.

doDefault

public java.lang.String doDefault()
                           throws java.lang.Exception
Display the Allow/Disallow authentication screen. The profile selected will be a 'remembered' profile from previous 'allow' authentication actions, or, the user's default profile (if the user hasn't previously allowed authentication to the site). If the user has previously 'always allowed' verification to the requesting site, this screen is bypassed and the default profile associated with the site will be used for attribute values.

Overrides:
doDefault in class com.opensymphony.xwork.ActionSupport
Returns:
ERROR if there is no authentication request message in session, otherwise INPUT.
Throws:
java.lang.Exception

doAllow

public java.lang.String doAllow()
                         throws java.lang.Exception
Allow OpenID authentication to a client site (RP). The profile selected (when the user clicks AllowAuthentication) will be 'remembered' for next time.

Returns:
SUCCESS
Throws:
java.lang.Exception

doAllowAlways

public java.lang.String doAllowAlways()
                               throws java.lang.Exception
Always allow OpenID authentication to a client site (RP). The profile selected (when the user clicks AllowAuthentication) will be 'remembered' for next time. All following authentications with this site will occur automatically.

Returns:
SUCCESS
Throws:
java.lang.Exception

doDeny

public java.lang.String doDeny()
                        throws java.lang.Exception
Deny OpenID authentication to a client site (RP).

Returns:
SUCCESS
Throws:
java.lang.Exception

getRequestingSite

public java.lang.String getRequestingSite()

setRequestingSite

public void setRequestingSite(java.lang.String requestingSite)

getIdentifier

public java.lang.String getIdentifier()
Overrides:
getIdentifier in class BaseAction

setIdentifier

public void setIdentifier(java.lang.String identifier)

getRequiredAttributes

public java.util.Collection getRequiredAttributes()

setRequiredAttributes

public void setRequiredAttributes(java.util.Collection requiredAttributes)

getOptionalAttributes

public java.util.Collection getOptionalAttributes()

setOptionalAttributes

public void setOptionalAttributes(java.util.Collection optionalAttributes)

getUser

public User getUser()

setUser

public void setUser(User user)

getProfileID

public long getProfileID()

setProfileID

public void setProfileID(long profileID)

getCurrentProfile

public Profile getCurrentProfile()

setCurrentProfile

public void setCurrentProfile(Profile currentProfile)

getSregAttributes

public SREGAttributes getSregAttributes()

setSregAttributes

public void setSregAttributes(SREGAttributes sregAttributes)

getProfileAttributesHelper

public ProfileAttributesHelper getProfileAttributesHelper()

setProfileAttributesHelper

public void setProfileAttributesHelper(ProfileAttributesHelper profileAttributesHelper)


Copyright © 2010 Atlassian. All Rights Reserved.