Class FlowableTokenAuthenticationConfigurer<H extends HttpSecurityBuilder<H>>
- java.lang.Object
-
- org.springframework.security.config.annotation.SecurityConfigurerAdapter<DefaultSecurityFilterChain,B>
-
- org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer<FlowableTokenAuthenticationConfigurer<H>,H>
-
- com.flowable.core.spring.security.token.FlowableTokenAuthenticationConfigurer<H>
-
- All Implemented Interfaces:
SecurityConfigurer<DefaultSecurityFilterChain,H>
public class FlowableTokenAuthenticationConfigurer<H extends HttpSecurityBuilder<H>> extends 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 ApplicationContext
applicationContext
protected PersistentTokenService
persistentTokenService
protected String
tokenRequestParameter
protected String
tokenSigningSecret
-
Constructor Summary
Constructors Constructor Description FlowableTokenAuthenticationConfigurer(ApplicationContext applicationContext, String tokenSigningSecret)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FlowableTokenAuthenticationProvider
build()
void
configure(H builder)
protected com.nimbusds.jwt.proc.JWTProcessor<com.nimbusds.jose.proc.SecurityContext>
createJWTProcessor()
protected PersistentTokenService
getPersistentTokenService()
void
init(H builder)
FlowableTokenAuthenticationConfigurer<H>
persistentTokenService(PersistentTokenService persistentTokenService)
ThePersistentTokenService
that should be used for loading and storing tokens.FlowableTokenAuthenticationConfigurer<H>
tokenRequestParameter(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
-
Methods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter
addObjectPostProcessor, and, getBuilder, postProcess, setBuilder
-
-
-
-
Field Detail
-
applicationContext
protected final ApplicationContext applicationContext
-
tokenSigningSecret
protected final String tokenSigningSecret
-
persistentTokenService
protected PersistentTokenService persistentTokenService
-
tokenRequestParameter
protected String tokenRequestParameter
-
-
Constructor Detail
-
FlowableTokenAuthenticationConfigurer
public FlowableTokenAuthenticationConfigurer(ApplicationContext applicationContext, String tokenSigningSecret)
-
-
Method Detail
-
init
public void init(H builder) throws Exception
- Specified by:
init
in interfaceSecurityConfigurer<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>
- Overrides:
init
in classSecurityConfigurerAdapter<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>
- Throws:
Exception
-
configure
public void configure(H builder) throws Exception
- Specified by:
configure
in interfaceSecurityConfigurer<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>
- Overrides:
configure
in classSecurityConfigurerAdapter<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>
- Throws:
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)
ThePersistentTokenService
that should be used for loading and storing tokens. If not set then the one from theApplicationContext
will be used- Parameters:
persistentTokenService
- the persistent token service that should be used- Returns:
- the configurer for chaining
-
tokenRequestParameter
public FlowableTokenAuthenticationConfigurer<H> tokenRequestParameter(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
-
-