Class GoogleService

public class GoogleService extends OidcService
OAuth service for Google as third-party authenticator.

The configuration of the service is done using properties, whose values need to match the values configured at Google.

  • google-oauth2-redirect-endpoint: the URL of the local redirect endpoint, to which the google OAuth service redirects the user after authentication. See also OidcService.getRedirectEndpoint()
  • google-oauth2-redirect-endpoint-path: optionally, the deployment path that corresponds to the redirect endpoint. See also getRedirectEndpointPath()
  • google-oauth2-client-id: The client ID
  • google-oauth2-client-secret: The client secret.

For example:

 <property name="google-oauth2-redirect-endpoint">
 <property name="google-oauth2-client-id">
 <property name="google-oauth2-client-secret">


Like all service classes, this class holds only configuration state. Thus, once configured, it can be safely shared between multiple sessions since its state (the configuration) is read-only.

See also:

  • Constructor Details

    • GoogleService

      public GoogleService(AuthService baseAuth)
  • Method Details

    • configured

      public static boolean configured()
      Checks whether a GoogleAuth service is properly configured.

      This returns true if a value is found for the three configuration properties.

    • getRedirectEndpointPath

      public String getRedirectEndpointPath()
      Description copied from class: OAuthService
      Returns the deployment path of the redirection endpoint.

      This returns the path at which the static resource is deployed that corresponds to the getRedirectEndpoint().

      The default implementation will derive this path from the getRedirectEndpoint() URL.

      getRedirectEndpointPath in class OAuthService