Class FlowableTokenAuthenticationConfigurer<H extends org.springframework.security.config.annotation.web.HttpSecurityBuilder<H>>
- java.lang.Object
-
- org.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,B>
-
- org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer<FlowableTokenAuthenticationConfigurer<H>,H>
-
- com.flowable.core.spring.security.token.FlowableTokenAuthenticationConfigurer<H>
-
- All Implemented Interfaces:
org.springframework.security.config.annotation.SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,H>
public class FlowableTokenAuthenticationConfigurer<H extends org.springframework.security.config.annotation.web.HttpSecurityBuilder<H>> extends org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer<FlowableTokenAuthenticationConfigurer<H>,H>
A Spring Security configurer used for configuring the Flowable Token Request Parameter authentication.- Author:
- Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field Description protected org.springframework.context.ApplicationContextapplicationContextprotected PersistentTokenServicepersistentTokenServiceprotected java.lang.StringtokenRequestParameterprotected java.lang.StringtokenSigningSecret
-
Constructor Summary
Constructors Constructor Description FlowableTokenAuthenticationConfigurer(org.springframework.context.ApplicationContext applicationContext, java.lang.String tokenSigningSecret)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FlowableTokenAuthenticationProviderbuild()voidconfigure(H builder)protected com.nimbusds.jwt.proc.JWTProcessor<com.nimbusds.jose.proc.SecurityContext>createJWTProcessor()protected PersistentTokenServicegetPersistentTokenService()voidinit(H builder)FlowableTokenAuthenticationConfigurer<H>persistentTokenService(PersistentTokenService persistentTokenService)ThePersistentTokenServicethat should be used for loading and storing tokens.FlowableTokenAuthenticationConfigurer<H>tokenRequestParameter(java.lang.String tokenRequestParameter)The request parameter where the token will be stored.-
Methods inherited from class org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer
disable, withObjectPostProcessor
-
-
-
-
Field Detail
-
applicationContext
protected final org.springframework.context.ApplicationContext applicationContext
-
tokenSigningSecret
protected final java.lang.String tokenSigningSecret
-
persistentTokenService
protected PersistentTokenService persistentTokenService
-
tokenRequestParameter
protected java.lang.String tokenRequestParameter
-
-
Method Detail
-
init
public void init(H builder) throws java.lang.Exception
- Specified by:
initin interfaceorg.springframework.security.config.annotation.SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,H extends org.springframework.security.config.annotation.web.HttpSecurityBuilder<H>>- Overrides:
initin classorg.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,H extends org.springframework.security.config.annotation.web.HttpSecurityBuilder<H>>- Throws:
java.lang.Exception
-
configure
public void configure(H builder) throws java.lang.Exception
- Specified by:
configurein interfaceorg.springframework.security.config.annotation.SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,H extends org.springframework.security.config.annotation.web.HttpSecurityBuilder<H>>- Overrides:
configurein classorg.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,H extends org.springframework.security.config.annotation.web.HttpSecurityBuilder<H>>- Throws:
java.lang.Exception
-
build
protected FlowableTokenAuthenticationProvider build()
-
createJWTProcessor
protected com.nimbusds.jwt.proc.JWTProcessor<com.nimbusds.jose.proc.SecurityContext> createJWTProcessor()
-
getPersistentTokenService
protected PersistentTokenService getPersistentTokenService()
-
persistentTokenService
public FlowableTokenAuthenticationConfigurer<H> persistentTokenService(PersistentTokenService persistentTokenService)
ThePersistentTokenServicethat should be used for loading and storing tokens. If not set then the one from theApplicationContextwill be used- Parameters:
persistentTokenService- the persistent token service that should be used- Returns:
- the configurer for chaining
-
tokenRequestParameter
public FlowableTokenAuthenticationConfigurer<H> tokenRequestParameter(java.lang.String tokenRequestParameter)
The request parameter where the token will be stored. Default value istoken.- Parameters:
tokenRequestParameter- the token request parameter- Returns:
- the configurer for chaining
-
-