Class GoogleTokenProvider.Builder
java.lang.Object
io.helidon.security.providers.google.login.GoogleTokenProvider.Builder
- All Implemented Interfaces:
Builder<GoogleTokenProvider.Builder,
,GoogleTokenProvider> Supplier<GoogleTokenProvider>
- Enclosing class:
GoogleTokenProvider
public static final class GoogleTokenProvider.Builder
extends Object
implements Builder<GoogleTokenProvider.Builder,GoogleTokenProvider>
Fluent API builder to build
GoogleTokenProvider
instance.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the instance from this builder.Google application client id, to validate that the token was generated by Google for us.Update this builder from configuration.optional
(boolean optional) If set to true, this provider will returnSecurityResponse.SecurityStatus.ABSTAIN
instead of failing in case of invalid request.outboundConfig
(OutboundConfig outboundConfig) Outbound configuration - a set of outbound targets that will have the token propagated.Set proxy host when talking to Google.proxyPort
(int port) Set proxy port when talking to Google.Set the authentication realm to build challenge, defaults to "helidon".tokenProvider
(TokenHandler provider) Token provider to extract Google access token from request, defaults to "Authorization" header with a "bearer " prefix.
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<GoogleTokenProvider.Builder,
GoogleTokenProvider> - Returns:
- instance of the built type
-
clientId
Google application client id, to validate that the token was generated by Google for us.- Parameters:
clientId
- client id as obtained from Google developer console- Returns:
- updated builder instance
-
optional
If set to true, this provider will returnSecurityResponse.SecurityStatus.ABSTAIN
instead of failing in case of invalid request.- Parameters:
optional
- whether to be optional or not- Returns:
- updated builder instance
-
tokenProvider
Token provider to extract Google access token from request, defaults to "Authorization" header with a "bearer " prefix.- Parameters:
provider
- token provider- Returns:
- updated builder instance
-
realm
Set the authentication realm to build challenge, defaults to "helidon".- Parameters:
realm
- realm of authentication- Returns:
- updated builder instance
-
proxyHost
Set proxy host when talking to Google.- Parameters:
host
- host of http proxy server- Returns:
- updated builder instance
-
proxyPort
Set proxy port when talking to Google.- Parameters:
port
- port of http proxy server, defaults to 80- Returns:
- updated builder instance
-
config
Update this builder from configuration.- Parameters:
config
- Configuration at provider (security.provider.x) key- Returns:
- updated builder instance
-
outboundConfig
Outbound configuration - a set of outbound targets that will have the token propagated.- Parameters:
outboundConfig
- configuration of outbound- Returns:
- updated builder instance
-