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, Serializable, 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
 String doAllow()
          Allow OpenID authentication to a client site (RP).
 String doAllowAlways()
          Always allow OpenID authentication to a client site (RP).
 String doDefault()
          Display the Allow/Disallow authentication screen.
 String doDeny()
          Deny OpenID authentication to a client site (RP).
 Profile getCurrentProfile()
           
 String getIdentifier()
           
protected  OpenIDAuthRequest getOpenIDAuthRequest()
          Retrieve the OpenIDAuthRequest from session.
 Collection getOptionalAttributes()
           
 ProfileAttributesHelper getProfileAttributesHelper()
           
 long getProfileID()
           
 String getRequestingSite()
           
 Collection getRequiredAttributes()
           
 SREGAttributes getSregAttributes()
           
 User getUser()
           
protected  void removeOpenIDAuthRequest()
          Removes the OpenIDAuthRequest from session.
 void setCurrentProfile(Profile currentProfile)
           
 void setIdentifier(String identifier)
           
protected  void setOpenIDAuthResponse(OpenIDAuthResponse authResp)
          Set the OpenIDAuthResponse into the request attributes.
 void setOptionalAttributes(Collection optionalAttributes)
           
 void setProfileAttributesHelper(ProfileAttributesHelper profileAttributesHelper)
           
 void setProfileID(long profileID)
           
 void setRequestingSite(String requestingSite)
           
 void setRequiredAttributes(Collection requiredAttributes)
           
 void setSregAttributes(SREGAttributes sregAttributes)
           
 void setUser(User user)
           
 
Methods inherited from class com.atlassian.crowd.openid.server.action.BaseAction
addActionMessage, baseUrl, containsActionMessages, getActionMessageAlertColor, getAttribute, getBaseURL, getFirstAttribute, getHttpAuthenticator, getHttpRequest, getPrincipalName, getRemotePrincipal, getRequest, getSecurityServerClient, getSession, getXsrfToken, getXsrfTokenName, isAdministrator, isAuthenticated, setHttpAuthenticator, setOpenIDAuthenticationManager, setProfileManager, setPropertyManager, setSecurityServerClient, setSiteManager, setUserManager, setXsrfTokenGenerator
 
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 String doDefault()
                 throws 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:
Exception

doAllow

public String doAllow()
               throws 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:
Exception

doAllowAlways

public String doAllowAlways()
                     throws 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:
Exception

doDeny

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

Returns:
SUCCESS
Throws:
Exception

getRequestingSite

public String getRequestingSite()

setRequestingSite

public void setRequestingSite(String requestingSite)

getIdentifier

public String getIdentifier()
Overrides:
getIdentifier in class BaseAction

setIdentifier

public void setIdentifier(String identifier)

getRequiredAttributes

public Collection getRequiredAttributes()

setRequiredAttributes

public void setRequiredAttributes(Collection requiredAttributes)

getOptionalAttributes

public Collection getOptionalAttributes()

setOptionalAttributes

public void setOptionalAttributes(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 © 2014 Atlassian. All Rights Reserved.