Class EndpointOidc.Builder

java.lang.Object
com.ngrok.definitions.EndpointOidc.Builder
Enclosing class:
EndpointOidc

public static class EndpointOidc.Builder extends Object
Builder class for EndpointOidc.
  • Method Details

    • enabled

      public EndpointOidc.Builder enabled(boolean enabled)
      true if the module will be applied to traffic, false to disable. default true if unspecified
      Parameters:
      enabled - the value of the enabled parameter as a boolean
      Returns:
      this builder instance
    • enabled

      public EndpointOidc.Builder enabled(Optional<Boolean> enabled)
      true if the module will be applied to traffic, false to disable. default true if unspecified
      Parameters:
      enabled - the value of the enabled parameter as a boolean, wrapped in an Optional
      Returns:
      this builder instance
    • optionsPassthrough

      public EndpointOidc.Builder optionsPassthrough(boolean optionsPassthrough)
      Do not enforce authentication on HTTP OPTIONS requests. necessary if you are supporting CORS.
      Parameters:
      optionsPassthrough - the value of the options_passthrough parameter as a boolean
      Returns:
      this builder instance
    • optionsPassthrough

      public EndpointOidc.Builder optionsPassthrough(Optional<Boolean> optionsPassthrough)
      Do not enforce authentication on HTTP OPTIONS requests. necessary if you are supporting CORS.
      Parameters:
      optionsPassthrough - the value of the options_passthrough parameter as a boolean, wrapped in an Optional
      Returns:
      this builder instance
    • cookiePrefix

      public EndpointOidc.Builder cookiePrefix(String cookiePrefix)
      the prefix of the session cookie that ngrok sets on the http client to cache authentication. default is 'ngrok.'
      Parameters:
      cookiePrefix - the value of the cookie_prefix parameter as a String
      Returns:
      this builder instance
    • cookiePrefix

      public EndpointOidc.Builder cookiePrefix(Optional<String> cookiePrefix)
      the prefix of the session cookie that ngrok sets on the http client to cache authentication. default is 'ngrok.'
      Parameters:
      cookiePrefix - the value of the cookie_prefix parameter as a String, wrapped in an Optional
      Returns:
      this builder instance
    • inactivityTimeout

      public EndpointOidc.Builder inactivityTimeout(long inactivityTimeout)
      Integer number of seconds of inactivity after which if the user has not accessed the endpoint, their session will time out and they will be forced to reauthenticate.
      Parameters:
      inactivityTimeout - the value of the inactivity_timeout parameter as a long
      Returns:
      this builder instance
    • inactivityTimeout

      public EndpointOidc.Builder inactivityTimeout(Optional<Long> inactivityTimeout)
      Integer number of seconds of inactivity after which if the user has not accessed the endpoint, their session will time out and they will be forced to reauthenticate.
      Parameters:
      inactivityTimeout - the value of the inactivity_timeout parameter as a long, wrapped in an Optional
      Returns:
      this builder instance
    • maximumDuration

      public EndpointOidc.Builder maximumDuration(Duration maximumDuration)
      Integer number of seconds of the maximum duration of an authenticated session. After this period is exceeded, a user must reauthenticate.
      Parameters:
      maximumDuration - the value of the maximum_duration parameter as a Duration
      Returns:
      this builder instance
    • maximumDuration

      public EndpointOidc.Builder maximumDuration(Optional<Duration> maximumDuration)
      Integer number of seconds of the maximum duration of an authenticated session. After this period is exceeded, a user must reauthenticate.
      Parameters:
      maximumDuration - the value of the maximum_duration parameter as a Duration, wrapped in an Optional
      Returns:
      this builder instance
    • issuer

      public EndpointOidc.Builder issuer(String issuer)
      URL of the OIDC "OpenID provider". This is the base URL used for discovery.
      Parameters:
      issuer - the value of the issuer parameter as a String
      Returns:
      this builder instance
    • issuer

      public EndpointOidc.Builder issuer(Optional<String> issuer)
      URL of the OIDC "OpenID provider". This is the base URL used for discovery.
      Parameters:
      issuer - the value of the issuer parameter as a String, wrapped in an Optional
      Returns:
      this builder instance
    • clientId

      public EndpointOidc.Builder clientId(String clientId)
      The OIDC app's client ID and OIDC audience.
      Parameters:
      clientId - the value of the client_id parameter as a String
      Returns:
      this builder instance
    • clientId

      public EndpointOidc.Builder clientId(Optional<String> clientId)
      The OIDC app's client ID and OIDC audience.
      Parameters:
      clientId - the value of the client_id parameter as a String, wrapped in an Optional
      Returns:
      this builder instance
    • clientSecret

      public EndpointOidc.Builder clientSecret(String clientSecret)
      The OIDC app's client secret.
      Parameters:
      clientSecret - the value of the client_secret parameter as a String
      Returns:
      this builder instance
    • clientSecret

      public EndpointOidc.Builder clientSecret(Optional<String> clientSecret)
      The OIDC app's client secret.
      Parameters:
      clientSecret - the value of the client_secret parameter as a String, wrapped in an Optional
      Returns:
      this builder instance
    • scopes

      public EndpointOidc.Builder scopes(List<String> scopes)
      The set of scopes to request from the OIDC identity provider.
      Parameters:
      scopes - the value of the scopes parameter as a List of String
      Returns:
      this builder instance
    • scopes

      public EndpointOidc.Builder scopes(Optional<List<String>> scopes)
      The set of scopes to request from the OIDC identity provider.
      Parameters:
      scopes - the value of the scopes parameter as a List of String, wrapped in an Optional
      Returns:
      this builder instance
    • build

      public EndpointOidc build()
      Constructs the EndpointOidc instance.
      Returns:
      a new EndpointOidc