Package net.shibboleth.idp.authn.context.impl

# Class SubjectScriptContextExtender

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.authn.context.impl.SubjectScriptContextExtender

All Implemented Interfaces:
  `FilterScriptContextExtender`, `ResolverScriptContextExtender`, `Component`, `DestructableComponent`, `InitializableComponent`, `ScriptContextExtender`

public class SubjectScriptContextExtender extends AbstractInitializableComponent implements ResolverScriptContextExtender, FilterScriptContextExtender
An extender that supplements an IdP `ScriptContext` with `Subject` information.

Since:
  5.0.0

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`private Function<ProfileRequestContext,SubjectContext>`
`subjectContextLookupStrategy`
Strategy used to locate the `SubjectContext` to use.

## Constructor Summary

Constructors
Constructor
Description
`SubjectScriptContextExtender()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`extendContext(ScriptContext scriptContext)`
`void`
`setSubjectContextLookupStrategy(Function<ProfileRequestContext,SubjectContext> strategy)`
Set the strategy used to locate the `SubjectContext`.

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized`

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

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

## Field Details

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### subjectContextLookupStrategy

@Nonnull private Function<ProfileRequestContext,SubjectContext> subjectContextLookupStrategy
Strategy used to locate the `SubjectContext` to use.

## Constructor Details

### SubjectScriptContextExtender

public SubjectScriptContextExtender()
Constructor.

## Method Details

### setSubjectContextLookupStrategy

public void setSubjectContextLookupStrategy(@Nonnull Function<ProfileRequestContext,SubjectContext> strategy)
Set the strategy used to locate the `SubjectContext`.

Parameters:
  `strategy` - strategy used to locate the `SubjectContext`

### extendContext

public void extendContext(@Nonnull ScriptContext scriptContext)

Specified by:
  `extendContext` in interface `ScriptContextExtender`