Class JwtProvider
java.lang.Object
io.helidon.security.spi.SynchronousProvider
io.helidon.security.providers.jwt.JwtProvider
- All Implemented Interfaces:
io.helidon.security.spi.AuthenticationProvider,io.helidon.security.spi.OutboundSecurityProvider,io.helidon.security.spi.SecurityProvider
public final class JwtProvider
extends io.helidon.security.spi.SynchronousProvider
implements io.helidon.security.spi.AuthenticationProvider, io.helidon.security.spi.OutboundSecurityProvider
Provider that can process JWT tokens in request headers and assert identity (e.g. create a
Principal
for a SubjectType.USER or SubjectType.SERVICE.
This provider can also propagate identity using JWT token, either by creating a new
JWT or by propagating the existing token "as is".
Verification and signatures of tokens is done through JWK standard - two separate
JWK files are expected (one for verification, one for signatures).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classFluent API builder forJwtProvider.static classA custom object to configure specific handling of outbound calls. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConfigure this for outbound requests to override user to use. -
Method Summary
Modifier and TypeMethodDescriptionstatic JwtProvider.Builderbuilder()A builder for this provider.static JwtProvidercreate(io.helidon.config.Config config) Create provider instance from configuration.booleanisOutboundSupported(io.helidon.security.ProviderRequest providerRequest, io.helidon.security.SecurityEnvironment outboundEnv, io.helidon.security.EndpointConfig outboundConfig) protected io.helidon.security.AuthenticationResponsesyncAuthenticate(io.helidon.security.ProviderRequest providerRequest) protected io.helidon.security.OutboundSecurityResponsesyncOutbound(io.helidon.security.ProviderRequest providerRequest, io.helidon.security.SecurityEnvironment outboundEnv, io.helidon.security.EndpointConfig outboundEndpointConfig) Methods inherited from class io.helidon.security.spi.SynchronousProvider
authenticate, authorize, outboundSecurity, syncAuthorizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.security.spi.AuthenticationProvider
authenticateMethods inherited from interface io.helidon.security.spi.OutboundSecurityProvider
outboundSecurityMethods inherited from interface io.helidon.security.spi.SecurityProvider
supportedAnnotations, supportedAttributes, supportedConfigKeys, supportedCustomObjects
-
Field Details
-
EP_PROPERTY_OUTBOUND_USER
Configure this for outbound requests to override user to use.- See Also:
-
-
Method Details
-
builder
A builder for this provider.- Returns:
- builder to create a new instance
-
create
Create provider instance from configuration.- Parameters:
config- configuration of this provider- Returns:
- provider instance
-
syncAuthenticate
protected io.helidon.security.AuthenticationResponse syncAuthenticate(io.helidon.security.ProviderRequest providerRequest) - Overrides:
syncAuthenticatein classio.helidon.security.spi.SynchronousProvider
-
isOutboundSupported
public boolean isOutboundSupported(io.helidon.security.ProviderRequest providerRequest, io.helidon.security.SecurityEnvironment outboundEnv, io.helidon.security.EndpointConfig outboundConfig) - Specified by:
isOutboundSupportedin interfaceio.helidon.security.spi.OutboundSecurityProvider
-
syncOutbound
protected io.helidon.security.OutboundSecurityResponse syncOutbound(io.helidon.security.ProviderRequest providerRequest, io.helidon.security.SecurityEnvironment outboundEnv, io.helidon.security.EndpointConfig outboundEndpointConfig) - Overrides:
syncOutboundin classio.helidon.security.spi.SynchronousProvider
-