public abstract class AbstractCasWebflowEventResolver extends java.lang.Object implements CasWebflowEventResolver
AbstractCasWebflowEventResolver
that provides parent
operations for all child event resolvers to handle core webflow changes.Modifier and Type | Field and Description |
---|---|
protected org.springframework.context.ConfigurableApplicationContext |
applicationContext
The Application context.
|
protected AuthenticationServiceSelectionPlan |
authenticationRequestServiceSelectionStrategies
Extract the service specially in the event that it's proxied by a callback.
|
protected AuthenticationSystemSupport |
authenticationSystemSupport
The Authentication system support.
|
protected CentralAuthenticationService |
centralAuthenticationService
The Central authentication service.
|
protected org.springframework.context.ApplicationEventPublisher |
eventPublisher
CAS event publisher.
|
protected MultifactorAuthenticationProviderSelector |
multifactorAuthenticationProviderSelector
The mfa selector.
|
protected ServicesManager |
servicesManager
The Services manager.
|
protected TicketRegistrySupport |
ticketRegistrySupport
Ticket registry support.
|
protected org.springframework.web.util.CookieGenerator |
warnCookieGenerator
Warn cookie generator.
|
Constructor and Description |
---|
AbstractCasWebflowEventResolver() |
Modifier and Type | Method and Description |
---|---|
protected static java.util.Map<java.lang.String,java.lang.Object> |
buildEventAttributeMap(Principal principal,
RegisteredService service,
MultifactorAuthenticationProvider provider)
Build event attribute map map.
|
protected java.util.Set<org.springframework.webflow.execution.Event> |
evaluateEventForProviderInContext(Principal principal,
RegisteredService service,
org.springframework.webflow.execution.RequestContext context,
MultifactorAuthenticationProvider provider)
Verify provider for current context and validate event id.
|
protected org.springframework.webflow.execution.Event |
getAuthenticationFailureErrorEvent(org.springframework.webflow.execution.RequestContext context)
Gets authentication failure error event.
|
protected java.util.Collection<MultifactorAuthenticationProvider> |
getAuthenticationProviderForService(RegisteredService service)
Gets authentication provider for service.
|
protected Credential |
getCredentialFromContext(org.springframework.webflow.execution.RequestContext context)
Gets credential from context.
|
protected java.util.Optional<MultifactorAuthenticationProvider> |
getMultifactorAuthenticationProviderFromApplicationContext(java.lang.String providerId)
Find the MultifactorAuthenticationProvider in the application contact that matches the specified providerId (e.g.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getPrincipalAttributesForMultifactorAuthentication(Principal principal)
Gets principal attributes for multifactor authentication.
|
protected java.util.Set<org.springframework.webflow.execution.Event> |
getResolvedEventsAsAttribute(org.springframework.webflow.execution.RequestContext context)
Gets resolved events as attribute.
|
protected org.springframework.webflow.execution.Event |
grantTicketGrantingTicketToAuthenticationResult(org.springframework.webflow.execution.RequestContext context,
AuthenticationResultBuilder authenticationResultBuilder,
Service service)
Grant ticket granting ticket.
|
protected java.util.Set<org.springframework.webflow.execution.Event> |
handleAuthenticationTransactionAndGrantTicketGrantingTicket(org.springframework.webflow.execution.RequestContext context)
Handle authentication transaction and grant ticket granting ticket.
|
protected org.springframework.webflow.execution.Event |
newEvent(java.lang.String id)
New event event.
|
protected org.springframework.webflow.execution.Event |
newEvent(java.lang.String id,
org.springframework.webflow.core.collection.AttributeMap attributes)
New event based on the given id.
|
protected org.springframework.webflow.execution.Event |
newEvent(java.lang.String id,
java.lang.Exception error)
New event based on the id, which contains an error attribute referring to the exception occurred.
|
protected void |
putResolvedEventsAsAttribute(org.springframework.webflow.execution.RequestContext context,
java.util.Set<org.springframework.webflow.execution.Event> resolvedEvents)
Put resolved events as attribute.
|
java.util.Set<org.springframework.webflow.execution.Event> |
resolve(org.springframework.webflow.execution.RequestContext context)
Resolve event.
|
protected java.util.Set<org.springframework.webflow.execution.Event> |
resolveEventViaAuthenticationAttribute(Authentication authentication,
java.util.Collection<java.lang.String> attributeNames,
RegisteredService service,
org.springframework.webflow.execution.RequestContext context,
java.util.Collection<MultifactorAuthenticationProvider> providers,
java.util.function.Predicate<java.lang.String> predicate)
Resolve event via authentication attribute set.
|
protected java.util.Set<org.springframework.webflow.execution.Event> |
resolveEventViaPrincipalAttribute(Principal principal,
java.util.Collection<java.lang.String> attributeNames,
RegisteredService service,
org.springframework.webflow.execution.RequestContext context,
java.util.Collection<MultifactorAuthenticationProvider> providers,
java.util.function.Predicate<java.lang.String> predicate)
Resolve event via principal attribute set.
|
protected Service |
resolveServiceFromAuthenticationRequest(org.springframework.webflow.execution.RequestContext context)
Resolve service from authentication request service.
|
protected Service |
resolveServiceFromAuthenticationRequest(Service service)
Resolve service from authentication request.
|
org.springframework.webflow.execution.Event |
resolveSingle(org.springframework.webflow.execution.RequestContext context)
Resolve single event.
|
protected org.springframework.webflow.execution.Event |
validateEventIdForMatchingTransitionInContext(java.lang.String eventId,
org.springframework.webflow.execution.RequestContext context,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Validate event for transition.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, resolveInternal
@Autowired protected org.springframework.context.ApplicationEventPublisher eventPublisher
@Autowired protected org.springframework.context.ConfigurableApplicationContext applicationContext
protected final AuthenticationSystemSupport authenticationSystemSupport
protected final CentralAuthenticationService centralAuthenticationService
protected final ServicesManager servicesManager
protected final TicketRegistrySupport ticketRegistrySupport
protected final org.springframework.web.util.CookieGenerator warnCookieGenerator
protected final AuthenticationServiceSelectionPlan authenticationRequestServiceSelectionStrategies
protected final MultifactorAuthenticationProviderSelector multifactorAuthenticationProviderSelector
protected org.springframework.webflow.execution.Event newEvent(java.lang.String id, java.lang.Exception error)
id
- the iderror
- the errorprotected org.springframework.webflow.execution.Event newEvent(java.lang.String id)
id
- the idprotected org.springframework.webflow.execution.Event newEvent(java.lang.String id, org.springframework.webflow.core.collection.AttributeMap attributes)
id
- the idattributes
- the attributesprotected Credential getCredentialFromContext(org.springframework.webflow.execution.RequestContext context)
context
- the contextprotected org.springframework.webflow.execution.Event grantTicketGrantingTicketToAuthenticationResult(org.springframework.webflow.execution.RequestContext context, AuthenticationResultBuilder authenticationResultBuilder, Service service)
context
- the contextauthenticationResultBuilder
- the authentication result builderservice
- the serviceprotected java.util.Collection<MultifactorAuthenticationProvider> getAuthenticationProviderForService(RegisteredService service)
service
- the serviceprotected org.springframework.webflow.execution.Event validateEventIdForMatchingTransitionInContext(java.lang.String eventId, org.springframework.webflow.execution.RequestContext context, java.util.Map<java.lang.String,java.lang.Object> attributes)
eventId
- the event idcontext
- the contextattributes
- the attributesprotected static java.util.Map<java.lang.String,java.lang.Object> buildEventAttributeMap(Principal principal, RegisteredService service, MultifactorAuthenticationProvider provider)
principal
- the principalservice
- the serviceprovider
- the providerprotected java.util.Set<org.springframework.webflow.execution.Event> evaluateEventForProviderInContext(Principal principal, RegisteredService service, org.springframework.webflow.execution.RequestContext context, MultifactorAuthenticationProvider provider)
principal
- the principalservice
- the servicecontext
- the contextprovider
- the providerprotected java.util.Set<org.springframework.webflow.execution.Event> resolveEventViaAuthenticationAttribute(Authentication authentication, java.util.Collection<java.lang.String> attributeNames, RegisteredService service, org.springframework.webflow.execution.RequestContext context, java.util.Collection<MultifactorAuthenticationProvider> providers, java.util.function.Predicate<java.lang.String> predicate)
authentication
- the authenticationattributeNames
- the attribute nameservice
- the servicecontext
- the contextproviders
- the providerspredicate
- the predicateprotected java.util.Set<org.springframework.webflow.execution.Event> resolveEventViaPrincipalAttribute(Principal principal, java.util.Collection<java.lang.String> attributeNames, RegisteredService service, org.springframework.webflow.execution.RequestContext context, java.util.Collection<MultifactorAuthenticationProvider> providers, java.util.function.Predicate<java.lang.String> predicate)
principal
- the principalattributeNames
- the attribute nameservice
- the servicecontext
- the contextproviders
- the providerspredicate
- the predicatepublic java.util.Set<org.springframework.webflow.execution.Event> resolve(org.springframework.webflow.execution.RequestContext context)
CasWebflowEventResolver
resolve
in interface CasWebflowEventResolver
context
- the contextpublic org.springframework.webflow.execution.Event resolveSingle(org.springframework.webflow.execution.RequestContext context)
CasWebflowEventResolver
resolveSingle
in interface CasWebflowEventResolver
context
- the contextprotected java.util.Optional<MultifactorAuthenticationProvider> getMultifactorAuthenticationProviderFromApplicationContext(java.lang.String providerId)
providerId
- the provider idprotected void putResolvedEventsAsAttribute(org.springframework.webflow.execution.RequestContext context, java.util.Set<org.springframework.webflow.execution.Event> resolvedEvents)
context
- the contextresolvedEvents
- the resolved eventsprotected Service resolveServiceFromAuthenticationRequest(Service service)
service
- the serviceprotected Service resolveServiceFromAuthenticationRequest(org.springframework.webflow.execution.RequestContext context)
context
- the contextprotected java.util.Set<org.springframework.webflow.execution.Event> getResolvedEventsAsAttribute(org.springframework.webflow.execution.RequestContext context)
context
- the contextprotected java.util.Set<org.springframework.webflow.execution.Event> handleAuthenticationTransactionAndGrantTicketGrantingTicket(org.springframework.webflow.execution.RequestContext context)
context
- the contextprotected org.springframework.webflow.execution.Event getAuthenticationFailureErrorEvent(org.springframework.webflow.execution.RequestContext context)
context
- the contextprotected java.util.Map<java.lang.String,java.lang.Object> getPrincipalAttributesForMultifactorAuthentication(Principal principal)
principal
- the principal