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