Class FlowableTokenAuthenticationConfigurer<H extends org.springframework.security.config.annotation.web.HttpSecurityBuilder<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 Detail

      • applicationContext

        protected final org.springframework.context.ApplicationContext applicationContext
      • tokenSigningSecret

        protected final java.lang.String tokenSigningSecret
      • tokenRequestParameter

        protected java.lang.String tokenRequestParameter
    • Constructor Detail

      • FlowableTokenAuthenticationConfigurer

        public FlowableTokenAuthenticationConfigurer​(org.springframework.context.ApplicationContext applicationContext,
                                                     java.lang.String tokenSigningSecret)
    • Method Detail

      • init

        public void init​(H builder)
                  throws java.lang.Exception
        Specified by:
        init in interface org.springframework.security.config.annotation.SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,​H extends org.springframework.security.config.annotation.web.HttpSecurityBuilder<H>>
        Overrides:
        init in class org.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:
        configure in interface org.springframework.security.config.annotation.SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,​H extends org.springframework.security.config.annotation.web.HttpSecurityBuilder<H>>
        Overrides:
        configure in class org.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,​H extends org.springframework.security.config.annotation.web.HttpSecurityBuilder<H>>
        Throws:
        java.lang.Exception
      • createJWTProcessor

        protected com.nimbusds.jwt.proc.JWTProcessor<com.nimbusds.jose.proc.SecurityContext> createJWTProcessor()
      • persistentTokenService

        public FlowableTokenAuthenticationConfigurer<H> persistentTokenService​(PersistentTokenService persistentTokenService)
        The PersistentTokenService that should be used for loading and storing tokens. If not set then the one from the ApplicationContext will 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 is token.
        Parameters:
        tokenRequestParameter - the token request parameter
        Returns:
        the configurer for chaining