Package net.shibboleth.idp.cas.flow.impl
Class GrantServiceTicketAction
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.idp.cas.flow.impl.AbstractCASProtocolAction<ServiceTicketRequest,ServiceTicketResponse>
net.shibboleth.idp.cas.flow.impl.GrantServiceTicketAction
- All Implemented Interfaces:
Component
,DestructableComponent
,InitializableComponent
,ProfileAction
,Aware
,MessageSource
,MessageSourceAware
,Action
public class GrantServiceTicketAction
extends AbstractCASProtocolAction<ServiceTicketRequest,ServiceTicketResponse>
Generates and stores a CAS protocol service ticket. Possible outcomes:
null
on successTicketCreationError
-
Field Summary
FieldsModifier and TypeFieldDescriptionStrategy used to locate theAttributeContext
associated with a givenProfileRequestContext
.private AttributeContext
AttributeContext to use.private final Function<ProfileRequestContext,
AuthenticationContext> AuthenticationContext lookup function.private AuthenticationResult
Authentication result.private final TicketService
Manages CAS tickets.private final ConfigLookupFunction<LoginConfiguration>
Profile configuration lookup function.private final org.slf4j.Logger
Class logger.private LoginConfiguration
Profile config.private final Function<ProfileRequestContext,
String> Function to retrieve subject principal name.private ServiceTicketRequest
CAS request.private SecurityConfiguration
Security config.private IdPSession
IdP's session.private final Function<ProfileRequestContext,
SessionContext> Looks up an IdP session context from IdP profile request context.private boolean
Whether consent needs to be stored in ticket. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doExecute
(ProfileRequestContext profileRequestContext) protected boolean
doPreExecute
(ProfileRequestContext profileRequestContext) private IdPSession
Get the IdP session.private AuthenticationResult
Gets the most recent authentication result from the IdP session.private String
Get the IdP subject principal name.void
Set the strategy used to locate theAttributeContext
associated with a givenProfileRequestContext
.Methods inherited from class net.shibboleth.idp.cas.flow.impl.AbstractCASProtocolAction
getCASRequest, getCASResponse, getCASService, getCASTicket, getProtocolContext, setCASRequest, setCASResponse, setCASService, setCASTicket
Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy
Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationCondition
Methods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, setHttpServletRequest, setHttpServletRequestSupplier, setHttpServletResponse, setHttpServletResponseSupplier
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
configLookupFunction
Profile configuration lookup function. -
sessionContextFunction
Looks up an IdP session context from IdP profile request context. -
authnCtxLookupFunction
AuthenticationContext lookup function. -
principalLookupFunction
Function to retrieve subject principal name. -
attributeContextLookupStrategy
Strategy used to locate theAttributeContext
associated with a givenProfileRequestContext
. -
casTicketService
Manages CAS tickets. -
loginConfig
Profile config. -
securityConfig
Security config. -
session
IdP's session. -
authnResult
Authentication result. -
storeConsent
private boolean storeConsentWhether consent needs to be stored in ticket. -
attributeCtx
AttributeContext to use. -
request
CAS request.
-
-
Constructor Details
-
GrantServiceTicketAction
Constructor.- Parameters:
ticketService
- Ticket service component.
-
-
Method Details
-
setAttributeContextLookupStrategy
public void setAttributeContextLookupStrategy(@Nonnull Function<ProfileRequestContext, AttributeContext> strategy) Set the strategy used to locate theAttributeContext
associated with a givenProfileRequestContext
.- Parameters:
strategy
- strategy used to locate theAttributeContext
associated with a givenProfileRequestContext
- Since:
- 4.2.0
-
doPreExecute
- Overrides:
doPreExecute
in classAbstractConditionalProfileAction
-
doExecute
- Overrides:
doExecute
in classAbstractProfileAction
-
getIdPSession
Get the IdP session.- Parameters:
prc
- profile request context- Returns:
- IdP session
-
getPrincipalName
Get the IdP subject principal name.- Parameters:
prc
- profile request context.- Returns:
- Principal name.
-
getLatestAuthenticationResult
Gets the most recent authentication result from the IdP session.- Returns:
- Latest authentication result.
- Throws:
IllegalStateException
- If no authentication results are found.
-