Class TokenExtensionFactory
java.lang.Object
net.shibboleth.idp.plugin.oidc.op.profile.spring.TokenExtensionFactory
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class TokenExtensionFactory
extends Object
implements org.springframework.context.ApplicationContextAware
Factory used for obtaining token extension beans of the desired type, identifier and scope.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of the supported token extension types. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanFlag to signal whether to allow non-prototype beans.private org.springframework.context.ApplicationContextThe application context from where to fetch the custom policy operators.private final StringThe identifier for the token extension bean.private final org.springframework.core.ResolvableTypeThe token extension type.private org.slf4j.LoggerClass logger. -
Constructor Summary
ConstructorsConstructorDescriptionTokenExtensionFactory(String id, TokenExtensionFactory.TokenExtensionType tokenExtensionType, boolean nonPrototype) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetBean()Get the token extension bean by using constraints from the class variables.voidsetApplicationContext(org.springframework.context.ApplicationContext context)
-
Field Details
-
log
@Nonnull private org.slf4j.Logger logClass logger. -
applicationContext
private org.springframework.context.ApplicationContext applicationContextThe application context from where to fetch the custom policy operators. -
beanId
The identifier for the token extension bean. -
extensionType
@Nonnull private final org.springframework.core.ResolvableType extensionTypeThe token extension type. -
allowNonPrototype
private final boolean allowNonPrototypeFlag to signal whether to allow non-prototype beans.
-
-
Constructor Details
-
TokenExtensionFactory
public TokenExtensionFactory(@Nonnull @ParameterName(name="id") String id, @Nonnull @ParameterName(name="tokenExtensionType") TokenExtensionFactory.TokenExtensionType tokenExtensionType, @ParameterName(name="allowNonPrototype") boolean nonPrototype) Constructor.- Parameters:
id- The identifier for the token extension bean.tokenExtensionType- The token extension type.nonPrototype- Flag to signal whether to allow non-prototype beans.
-
-
Method Details
-
getBean
Get the token extension bean by using constraints from the class variables.- Returns:
- The bean if one meeting the constraints was found, or null otherwise.
-
setApplicationContext
public void setApplicationContext(@Nonnull org.springframework.context.ApplicationContext context) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-