Class JwtAuthProvider.JwtOutboundTarget

  • Enclosing class:
    JwtAuthProvider

    public static class JwtAuthProvider.JwtOutboundTarget
    extends Object
    A custom object to configure specific handling of outbound calls.
    • Constructor Detail

      • JwtOutboundTarget

        public JwtOutboundTarget​(TokenHandler outboundHandler,
                                 String jwtKid,
                                 String jwkKid,
                                 String audience,
                                 int notBeforeSeconds,
                                 long validitySeconds)
        Create an instance to add to OutboundTarget.
        Parameters:
        outboundHandler - token handler to inject JWT into outbound headers
        jwtKid - key id to put into a JWT
        jwkKid - key id to use to sign using JWK - if not defined, existing token will be propagated if present
        audience - audience to create a JWT for
        notBeforeSeconds - seconds before now the token is valid (e.g. now - notBeforeSeconds = JWT not before)
        validitySeconds - seconds after now the token is valid (e.g. now + validitySeconds = JWT expiration time)
    • Method Detail

      • fromConfig

        public static JwtAuthProvider.JwtOutboundTarget fromConfig​(Config config,
                                                                   TokenHandler defaultHandler)
        Load an instance from configuration. Expected keys:
        • jwt-kid - the key id to put into JWT
        • jwk-kid - the key id to look for when signing the JWT
        • jwt-audience - the audience of this JWT
        • jwt-not-before-seconds - not before seconds
        • jwt-validity-seconds - validity of JWT
        Parameters:
        config - configuration to load data from
        defaultHandler - default outbound token handler
        Returns:
        a new instance configured from config
        See Also:
        JwtOutboundTarget(TokenHandler, String, String, String, int, long)