Class EndpointOAuth.Builder

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

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

    • enabled

      public EndpointOAuth.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 EndpointOAuth.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
    • provider

      public EndpointOAuth.Builder provider(EndpointOAuthProvider provider)
      an object which defines the identity provider to use for authentication and configuration for who may access the endpoint
      Parameters:
      provider - the value of the provider parameter as a EndpointOAuthProvider
      Returns:
      this builder instance
    • provider

      an object which defines the identity provider to use for authentication and configuration for who may access the endpoint
      Parameters:
      provider - the value of the provider parameter as a EndpointOAuthProvider, wrapped in an Optional
      Returns:
      this builder instance
    • optionsPassthrough

      public EndpointOAuth.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 EndpointOAuth.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 EndpointOAuth.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 EndpointOAuth.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 EndpointOAuth.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 EndpointOAuth.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 EndpointOAuth.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 EndpointOAuth.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
    • authCheckInterval

      public EndpointOAuth.Builder authCheckInterval(long authCheckInterval)
      Integer number of seconds after which ngrok guarantees it will refresh user state from the identity provider and recheck whether the user is still authorized to access the endpoint. This is the preferred tunable to use to enforce a minimum amount of time after which a revoked user will no longer be able to access the resource.
      Parameters:
      authCheckInterval - the value of the auth_check_interval parameter as a long
      Returns:
      this builder instance
    • authCheckInterval

      public EndpointOAuth.Builder authCheckInterval(Optional<Long> authCheckInterval)
      Integer number of seconds after which ngrok guarantees it will refresh user state from the identity provider and recheck whether the user is still authorized to access the endpoint. This is the preferred tunable to use to enforce a minimum amount of time after which a revoked user will no longer be able to access the resource.
      Parameters:
      authCheckInterval - the value of the auth_check_interval parameter as a long, wrapped in an Optional
      Returns:
      this builder instance
    • build

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