Class GoogleTokenProvider
- java.lang.Object
- 
- io.helidon.security.spi.SynchronousProvider
- 
- io.helidon.security.providers.google.login.GoogleTokenProvider
 
 
- 
- All Implemented Interfaces:
- AuthenticationProvider,- OutboundSecurityProvider,- SecurityProvider
 
 public final class GoogleTokenProvider extends SynchronousProvider implements AuthenticationProvider, OutboundSecurityProvider Provider supporting login button from front-end. This expects the token to be sent in a header. By default, Authorization header with bearer is expected, e.g.:Authorization: bearer abcdefg_google_id_token_from_login_button_callback. Configure login button as described here: https://developers.google.com/identity/sign-in/web/sign-in See google-login example.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classGoogleTokenProvider.BuilderFluent API builder to buildGoogleTokenProviderinstance.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GoogleTokenProvider.Builderbuilder()Fluent API builder to buildGoogleTokenProviderinstance.static GoogleTokenProvidercreate(Config config)Create an instance from configuration.booleanisOutboundSupported(ProviderRequest providerRequest, SecurityEnvironment outboundEnv, EndpointConfig outboundConfig)Check if the path to be executed is supported by this security provider.protected AuthenticationResponsesyncAuthenticate(ProviderRequest providerRequest)Synchronous authentication.protected OutboundSecurityResponsesyncOutbound(ProviderRequest providerRequest, SecurityEnvironment outboundEnv, EndpointConfig outboundEndpointConfig)Synchronous outbound security.- 
Methods inherited from class io.helidon.security.spi.SynchronousProviderauthenticate, authorize, outboundSecurity, syncAuthorize
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface io.helidon.security.spi.AuthenticationProviderauthenticate
 - 
Methods inherited from interface io.helidon.security.spi.OutboundSecurityProvideroutboundSecurity
 - 
Methods inherited from interface io.helidon.security.spi.SecurityProvidersupportedAnnotations, supportedAttributes, supportedConfigKeys, supportedCustomObjects
 
- 
 
- 
- 
- 
Method Detail- 
createpublic static GoogleTokenProvider create(Config config) Create an instance from configuration. Used by Security when configuring this provider from configuration by class name.- Parameters:
- config- Configuration located on the provider's key
- Returns:
- Instance configured from the configuration instance
 
 - 
builderpublic static GoogleTokenProvider.Builder builder() Fluent API builder to buildGoogleTokenProviderinstance.- Returns:
- Builder with just default values
 
 - 
syncAuthenticateprotected AuthenticationResponse syncAuthenticate(ProviderRequest providerRequest) Description copied from class:SynchronousProviderSynchronous authentication.- Overrides:
- syncAuthenticatein class- SynchronousProvider
- Parameters:
- providerRequest- context with environment, subject(s) etc.
- Returns:
- authentication response
- See Also:
- AuthenticationProvider.authenticate(ProviderRequest)
 
 - 
isOutboundSupportedpublic boolean isOutboundSupported(ProviderRequest providerRequest, SecurityEnvironment outboundEnv, EndpointConfig outboundConfig) Description copied from interface:OutboundSecurityProviderCheck if the path to be executed is supported by this security provider. Defaults to true.- Specified by:
- isOutboundSupportedin interface- OutboundSecurityProvider
- Parameters:
- providerRequest- context with environment, subject(s) etc. that was received
- outboundEnv- environment for outbound call
- outboundConfig- outbound endpoint configuration
- Returns:
- true if this identity propagator can generate required headers for the path defined
 
 - 
syncOutboundprotected OutboundSecurityResponse syncOutbound(ProviderRequest providerRequest, SecurityEnvironment outboundEnv, EndpointConfig outboundEndpointConfig) Description copied from class:SynchronousProviderSynchronous outbound security.- Overrides:
- syncOutboundin class- SynchronousProvider
- Parameters:
- providerRequest- context with environment, subject(s) etc.
- outboundEnv- environment of this outbound call
- outboundEndpointConfig- endpoint config for outbound call
- Returns:
- outbound response
- See Also:
- OutboundSecurityProvider.outboundSecurity(ProviderRequest, SecurityEnvironment, EndpointConfig),- OutboundSecurityProvider.isOutboundSupported(ProviderRequest, SecurityEnvironment, EndpointConfig)
 
 
- 
 
-