Package net.shibboleth.idp.authn.impl

# Class ExternalAuthenticationImpl

java.lang.Object
net.shibboleth.idp.authn.ExternalAuthentication
net.shibboleth.idp.authn.impl.ExternalAuthenticationImpl

public class ExternalAuthenticationImpl extends ExternalAuthentication
Implementation of the `ExternalAuthentication` API that handles moving information in and out of request attributes.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final boolean`
`extendedFlow`
Track whether we were invoked from within another login flow.
`private Function<ProfileRequestContext,RelyingPartyContext>`
`relyingPartyContextLookupStrategy`
Lookup function for relying party context.

### Fields inherited from class net.shibboleth.idp.authn.ExternalAuthentication

`ATTRIBUTES_KEY, AUTHENTICATING_AUTHORITIES_KEY, AUTHENTICATION_ERROR_KEY, AUTHENTICATION_EVENT_KEY, AUTHENTICATION_EXCEPTION_KEY, AUTHENTICATION_INSTANT_KEY, CONVERSATION_KEY, DONOTCACHE_KEY, EXTENDED_FLOW_PARAM, FORCE_AUTHN_PARAM, PASSIVE_AUTHN_PARAM, PREVIOUSRESULT_KEY, PRINCIPAL_KEY, PRINCIPAL_NAME_KEY, RELYING_PARTY_PARAM, RESULT_LIFETIME_KEY, RESULT_TIMEOUT_KEY, REVOKECONSENT_KEY, SUBJECT_KEY, SWF_KEY`

## Constructor Summary

Constructors
Constructor
Description
`ExternalAuthenticationImpl()`
Constructor.
`ExternalAuthenticationImpl(boolean extended)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doFinish(HttpServletRequest request, HttpServletResponse response, ProfileRequestContext profileRequestContext, ExternalAuthenticationContext extContext)`
Complete a request for external authentication by seeking out the information stored in request attributes and transferring to the session's conversation state, and then transfer control back to the authentication web flow.
`protected void`
`doStart(HttpServletRequest request, ProfileRequestContext profileRequestContext, ExternalAuthenticationContext externalAuthenticationContext)`
Initialize a request for external authentication by seeking out the information stored in the servlet session and exposing it as request attributes.
`void`
`setRelyingPartyContextLookupStrategy(Function<ProfileRequestContext,RelyingPartyContext> strategy)`
Set lookup strategy for relying party context.

### Methods inherited from class net.shibboleth.idp.authn.ExternalAuthentication

`finishExternalAuthentication, getExternalRedirect, getProfileRequestContext, startExternalAuthentication`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### relyingPartyContextLookupStrategy

@Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategy
Lookup function for relying party context.

### extendedFlow

private final boolean extendedFlow
Track whether we were invoked from within another login flow.

## Constructor Details

### ExternalAuthenticationImpl

public ExternalAuthenticationImpl()
Constructor.

### ExternalAuthenticationImpl

public ExternalAuthenticationImpl(boolean extended)
Constructor.

Parameters:
  `extended` - called as extended flow from another login flow

## Method Details

### setRelyingPartyContextLookupStrategy

public void setRelyingPartyContextLookupStrategy(@Nonnull Function<ProfileRequestContext,RelyingPartyContext> strategy)
Set lookup strategy for relying party context.

Parameters:
  `strategy` - lookup strategy

### doStart

protected void doStart(@Nonnull HttpServletRequest request, @Nonnull ProfileRequestContext profileRequestContext, @Nonnull ExternalAuthenticationContext externalAuthenticationContext) throws ExternalAuthenticationException
Initialize a request for external authentication by seeking out the information stored in the servlet session and exposing it as request attributes.

Overrides:
  `doStart` in class `ExternalAuthentication`
Parameters:
  `request` - servlet request
  `profileRequestContext` - current profile request context
  `externalAuthenticationContext` - external authentication context
Throws:
  `ExternalAuthenticationException` - if an error occurs

### doFinish

protected void doFinish(@Nonnull HttpServletRequest request, @Nonnull HttpServletResponse response, @Nonnull ProfileRequestContext profileRequestContext, @Nonnull ExternalAuthenticationContext extContext) throws ExternalAuthenticationException, IOException
Complete a request for external authentication by seeking out the information stored in request attributes and transferring to the session's conversation state, and then transfer control back to the authentication web flow.

Specified by:
  `doFinish` in class `ExternalAuthentication`
Parameters:
  `request` - servlet request
  `response` - servlet response
  `profileRequestContext` - current profile request context
  `extContext` - external authentication context
Throws:
  `ExternalAuthenticationException` - if an error occurs
  `IOException` - if the redirect cannot be issued