public abstract class AbstractCasView
extends org.springframework.web.servlet.view.AbstractView
Modifier and Type | Field and Description |
---|---|
protected CasAttributeEncoder |
casAttributeEncoder
The attribute encoder instance.
|
protected org.slf4j.Logger |
logger
Logger instance.
|
protected ServicesManager |
servicesManager
The Services manager.
|
protected boolean |
successResponse
Indicate whether this view will be generating the success response or not.
|
Constructor and Description |
---|
AbstractCasView() |
Modifier and Type | Method and Description |
---|---|
protected void |
decideAttributeReleaseBasedOnServiceAttributePolicy(java.util.Map<java.lang.String,java.lang.Object> attributes,
java.lang.String attributeValue,
java.lang.String attributeName,
RegisteredService service,
boolean doesAttributePolicyAllow)
Decide attribute release based on service attribute policy.
|
protected void |
decideIfCredentialPasswordShouldBeReleasedAsAttribute(java.util.Map<java.lang.String,java.lang.Object> attributes,
java.util.Map<java.lang.String,java.lang.Object> model,
RegisteredService service)
Decide if credential password should be released as attribute.
|
protected void |
decideIfProxyGrantingTicketShouldBeReleasedAsAttribute(java.util.Map<java.lang.String,java.lang.Object> attributes,
java.util.Map<java.lang.String,java.lang.Object> model,
RegisteredService service)
Decide if PGT should be released as attribute.
|
protected Assertion |
getAssertionFrom(java.util.Map<java.lang.String,java.lang.Object> model)
Gets the assertion from the model.
|
protected java.lang.String |
getAuthenticationAttribute(java.util.Map<java.lang.String,java.lang.Object> model,
java.lang.String attributeName)
Gets an authentication attribute from the primary authentication object.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getAuthenticationAttributes(java.util.Map<java.lang.String,java.lang.Object> model)
Gets authentication attributes from the primary authentication object.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getAuthenticationAttributesAsMultiValuedAttributes(java.util.Map<java.lang.String,java.lang.Object> model)
Gets authentication attributes.
|
java.lang.String |
getAuthenticationContextAttribute() |
protected java.time.ZonedDateTime |
getAuthenticationDate(java.util.Map<java.lang.String,java.lang.Object> model)
Gets authentication date.
|
CasAttributeEncoder |
getCasAttributeEncoder() |
protected java.util.Collection<Authentication> |
getChainedAuthentications(java.util.Map<java.lang.String,java.lang.Object> model)
Gets chained authentications.
|
protected java.lang.String |
getErrorCodeFrom(java.util.Map<java.lang.String,java.lang.Object> model)
Gets error code from.
|
protected java.lang.String |
getErrorDescriptionFrom(java.util.Map<java.lang.String,java.lang.Object> model)
Gets error description from.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getModelAttributes(java.util.Map<java.lang.String,java.lang.Object> model)
Gets model attributes.
|
protected Authentication |
getPrimaryAuthenticationFrom(java.util.Map<java.lang.String,java.lang.Object> model)
Gets the authentication from the model.
|
protected Principal |
getPrincipal(java.util.Map<java.lang.String,java.lang.Object> model)
Gets the principal from the model.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getPrincipalAttributesAsMultiValuedAttributes(java.util.Map<java.lang.String,java.lang.Object> model)
Gets principal attributes.
|
protected java.lang.String |
getProxyGrantingTicketId(java.util.Map<java.lang.String,java.lang.Object> model)
Gets the PGT from the model.
|
protected java.lang.String |
getProxyGrantingTicketIou(java.util.Map<java.lang.String,java.lang.Object> model)
Gets the PGT-IOU from the model.
|
protected java.util.Optional<MultifactorAuthenticationProvider> |
getSatisfiedMultifactorAuthenticationProvider(java.util.Map<java.lang.String,java.lang.Object> model)
Gets satisfied multifactor authentication provider.
|
protected Service |
getServiceFrom(java.util.Map<java.lang.String,java.lang.Object> model)
Gets validated service from the model.
|
ServicesManager |
getServicesManager() |
protected boolean |
isAssertionBackedByNewLogin(java.util.Map<java.lang.String,java.lang.Object> model)
Is assertion backed by new login?
|
protected boolean |
isRememberMeAuthentication(java.util.Map<java.lang.String,java.lang.Object> model)
Is remember me authentication?
looks at the authentication object to find
RememberMeCredential.AUTHENTICATION_ATTRIBUTE_REMEMBER_ME
and expects the assertion to also note a new login session. |
protected void |
putAllIntoModel(java.util.Map<java.lang.String,java.lang.Object> model,
java.util.Map<java.lang.String,java.lang.Object> values)
Put all into model.
|
protected void |
putIntoModel(java.util.Map<java.lang.String,java.lang.Object> model,
java.lang.String key,
java.lang.Object value)
Put into model.
|
void |
setAuthenticationContextAttribute(java.lang.String authenticationContextAttribute) |
void |
setCasAttributeEncoder(CasAttributeEncoder casAttributeEncoder) |
void |
setServicesManager(ServicesManager servicesManager) |
void |
setSuccessResponse(boolean successResponse) |
addStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getRequestToExpose, getStaticAttributes, isExposePathVariables, prepareResponse, render, renderMergedOutputModel, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setRequestContextAttribute, setResponseContentType, toString, writeToResponse
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
protected boolean successResponse
protected CasAttributeEncoder casAttributeEncoder
protected ServicesManager servicesManager
protected transient org.slf4j.Logger logger
protected Assertion getAssertionFrom(java.util.Map<java.lang.String,java.lang.Object> model)
model
- the modelprotected java.lang.String getErrorCodeFrom(java.util.Map<java.lang.String,java.lang.Object> model)
model
- the modelprotected java.lang.String getErrorDescriptionFrom(java.util.Map<java.lang.String,java.lang.Object> model)
model
- the modelprotected java.lang.String getProxyGrantingTicketId(java.util.Map<java.lang.String,java.lang.Object> model)
model
- the modelprotected java.lang.String getProxyGrantingTicketIou(java.util.Map<java.lang.String,java.lang.Object> model)
model
- the modelprotected Authentication getPrimaryAuthenticationFrom(java.util.Map<java.lang.String,java.lang.Object> model)
model
- the modelprotected java.util.Map<java.lang.String,java.lang.Object> getModelAttributes(java.util.Map<java.lang.String,java.lang.Object> model)
model
- the modelprotected java.util.Map<java.lang.String,java.lang.Object> getAuthenticationAttributes(java.util.Map<java.lang.String,java.lang.Object> model)
model
- the modelprotected java.lang.String getAuthenticationAttribute(java.util.Map<java.lang.String,java.lang.Object> model, java.lang.String attributeName)
model
- the modelattributeName
- the attribute nameprotected Principal getPrincipal(java.util.Map<java.lang.String,java.lang.Object> model)
model
- the modelprotected java.util.Map<java.lang.String,java.lang.Object> getPrincipalAttributesAsMultiValuedAttributes(java.util.Map<java.lang.String,java.lang.Object> model)
model
- the modelconvertAttributeValuesToMultiValuedObjects(java.util.Map)
protected java.util.Map<java.lang.String,java.lang.Object> getAuthenticationAttributesAsMultiValuedAttributes(java.util.Map<java.lang.String,java.lang.Object> model)
model
- the modelconvertAttributeValuesToMultiValuedObjects(java.util.Map)
protected boolean isRememberMeAuthentication(java.util.Map<java.lang.String,java.lang.Object> model)
RememberMeCredential.AUTHENTICATION_ATTRIBUTE_REMEMBER_ME
and expects the assertion to also note a new login session.model
- the modelprotected java.util.Optional<MultifactorAuthenticationProvider> getSatisfiedMultifactorAuthenticationProvider(java.util.Map<java.lang.String,java.lang.Object> model)
model
- the modelprotected boolean isAssertionBackedByNewLogin(java.util.Map<java.lang.String,java.lang.Object> model)
model
- the modelprotected java.time.ZonedDateTime getAuthenticationDate(java.util.Map<java.lang.String,java.lang.Object> model)
model
- the modelprotected Service getServiceFrom(java.util.Map<java.lang.String,java.lang.Object> model)
model
- the modelprotected java.util.Collection<Authentication> getChainedAuthentications(java.util.Map<java.lang.String,java.lang.Object> model)
model
- the modelprotected void decideIfCredentialPasswordShouldBeReleasedAsAttribute(java.util.Map<java.lang.String,java.lang.Object> attributes, java.util.Map<java.lang.String,java.lang.Object> model, RegisteredService service)
attributes
- the attributesmodel
- the modelservice
- the serviceprotected void decideIfProxyGrantingTicketShouldBeReleasedAsAttribute(java.util.Map<java.lang.String,java.lang.Object> attributes, java.util.Map<java.lang.String,java.lang.Object> model, RegisteredService service)
attributes
- the attributesmodel
- the modelservice
- the serviceprotected void decideAttributeReleaseBasedOnServiceAttributePolicy(java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String attributeValue, java.lang.String attributeName, RegisteredService service, boolean doesAttributePolicyAllow)
attributes
- the attributesattributeValue
- the attribute valueattributeName
- the attribute nameservice
- the servicedoesAttributePolicyAllow
- does attribute policy allow release of this attribute?protected void putIntoModel(java.util.Map<java.lang.String,java.lang.Object> model, java.lang.String key, java.lang.Object value)
model
- the modelkey
- the keyvalue
- the valueprotected void putAllIntoModel(java.util.Map<java.lang.String,java.lang.Object> model, java.util.Map<java.lang.String,java.lang.Object> values)
model
- the modelvalues
- the valuespublic void setServicesManager(ServicesManager servicesManager)
public void setCasAttributeEncoder(CasAttributeEncoder casAttributeEncoder)
public CasAttributeEncoder getCasAttributeEncoder()
public ServicesManager getServicesManager()
public void setSuccessResponse(boolean successResponse)
public java.lang.String getAuthenticationContextAttribute()
public void setAuthenticationContextAttribute(java.lang.String authenticationContextAttribute)