public static final class JwtProvider.Builder extends Object implements Builder<JwtProvider>
JwtProvider.| Modifier and Type | Method and Description |
|---|---|
JwtProvider.Builder |
allowImpersonation(boolean allowImpersonation)
Whether to allow impersonation by explicitly overriding
username from outbound requests using
JwtProvider.EP_PROPERTY_OUTBOUND_USER property. |
JwtProvider.Builder |
atnTokenHandler(TokenHandler tokenHandler)
Token handler to extract username from request.
|
JwtProvider.Builder |
authenticate(boolean authenticate)
Whether to authenticate requests.
|
JwtProvider |
build()
Build the instance from this builder.
|
JwtProvider.Builder |
config(Config config)
Load this builder from a configuration.
|
void |
expectedAudience(String audience)
Audience expected in inbound JWTs.
|
JwtProvider.Builder |
issuer(String issuer)
Issuer used to create new JWTs.
|
JwtProvider.Builder |
optional(boolean optional)
Whether authentication is required.
|
JwtProvider.Builder |
outboundConfig(OutboundConfig config)
Configuration of outbound rules.
|
JwtProvider.Builder |
propagate(boolean propagate)
Whether to propagate identity.
|
JwtProvider.Builder |
signJwk(Resource signJwkResource)
JWK resource used to sign JWTs created by us.
|
JwtProvider.Builder |
subjectType(SubjectType subjectType)
Principal type this provider extracts (and also propagates).
|
JwtProvider.Builder |
verifyJwk(Resource verifyJwkResource)
JWK resource used to verify JWTs created by other parties.
|
public JwtProvider build()
Builderbuild in interface Builder<JwtProvider>public JwtProvider.Builder propagate(boolean propagate)
propagate - whether to propagate identity (true) or not (false)public JwtProvider.Builder authenticate(boolean authenticate)
authenticate - whether to authenticate (true) or not (false)public JwtProvider.Builder allowImpersonation(boolean allowImpersonation)
JwtProvider.EP_PROPERTY_OUTBOUND_USER property.
By default this is not allowed and identity can only be propagated.allowImpersonation - set to true to allow impersonationpublic JwtProvider.Builder subjectType(SubjectType subjectType)
subjectType - type of principalpublic JwtProvider.Builder atnTokenHandler(TokenHandler tokenHandler)
tokenHandler - token handler instancepublic JwtProvider.Builder optional(boolean optional)
optional - whether authentication is optional (true) or required (false)public JwtProvider.Builder outboundConfig(OutboundConfig config)
config - outbound configuration, each target may contain custom object JwtProvider.JwtOutboundTarget
to add our configuration.public JwtProvider.Builder signJwk(Resource signJwkResource)
signJwkResource - resource pointing to a JSON with keyspublic JwtProvider.Builder verifyJwk(Resource verifyJwkResource)
verifyJwkResource - resource pointing to a JSON with keyspublic JwtProvider.Builder issuer(String issuer)
issuer - issuer to add to the issuer claimpublic JwtProvider.Builder config(Config config)
config - configuration to load frompublic void expectedAudience(String audience)
audience - audience stringCopyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.