Package com.ngrok.definitions
Class EndpointOAuth.Builder
java.lang.Object
com.ngrok.definitions.EndpointOAuth.Builder
- Enclosing class:
- EndpointOAuth
Builder class for
EndpointOAuth.-
Method Summary
Modifier and TypeMethodDescriptionauthCheckInterval(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.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.build()Constructs theEndpointOAuthinstance.cookiePrefix(String cookiePrefix) the prefix of the session cookie that ngrok sets on the http client to cache authentication.cookiePrefix(Optional<String> cookiePrefix) the prefix of the session cookie that ngrok sets on the http client to cache authentication.enabled(boolean enabled) trueif the module will be applied to traffic,falseto disable.trueif the module will be applied to traffic,falseto disable.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.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.maximumDuration(Duration maximumDuration) Integer number of seconds of the maximum duration of an authenticated session.maximumDuration(Optional<Duration> maximumDuration) Integer number of seconds of the maximum duration of an authenticated session.optionsPassthrough(boolean optionsPassthrough) Do not enforce authentication on HTTP OPTIONS requests.optionsPassthrough(Optional<Boolean> optionsPassthrough) Do not enforce authentication on HTTP OPTIONS requests.provider(EndpointOAuthProvider provider) an object which defines the identity provider to use for authentication and configuration for who may access the endpointprovider(Optional<EndpointOAuthProvider> provider) an object which defines the identity provider to use for authentication and configuration for who may access the endpoint
-
Method Details
-
enabled
trueif the module will be applied to traffic,falseto disable. defaulttrueif unspecified- Parameters:
enabled- the value of theenabledparameter as aboolean- Returns:
- this builder instance
-
enabled
trueif the module will be applied to traffic,falseto disable. defaulttrueif unspecified- Parameters:
enabled- the value of theenabledparameter as aboolean, wrapped in anOptional- 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 theproviderparameter as aEndpointOAuthProvider- 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 theproviderparameter as aEndpointOAuthProvider, wrapped in anOptional- Returns:
- this builder instance
-
optionsPassthrough
Do not enforce authentication on HTTP OPTIONS requests. necessary if you are supporting CORS.- Parameters:
optionsPassthrough- the value of theoptions_passthroughparameter as aboolean- Returns:
- this builder instance
-
optionsPassthrough
Do not enforce authentication on HTTP OPTIONS requests. necessary if you are supporting CORS.- Parameters:
optionsPassthrough- the value of theoptions_passthroughparameter as aboolean, wrapped in anOptional- Returns:
- this builder instance
-
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 thecookie_prefixparameter as aString- Returns:
- this builder instance
-
cookiePrefix
the prefix of the session cookie that ngrok sets on the http client to cache authentication. default is 'ngrok.' -
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 theinactivity_timeoutparameter as along- Returns:
- this builder instance
-
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 theinactivity_timeoutparameter as along, wrapped in anOptional- Returns:
- this builder instance
-
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 themaximum_durationparameter as aDuration- Returns:
- this builder instance
-
maximumDuration
Integer number of seconds of the maximum duration of an authenticated session. After this period is exceeded, a user must reauthenticate. -
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 theauth_check_intervalparameter as along- Returns:
- this builder instance
-
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 theauth_check_intervalparameter as along, wrapped in anOptional- Returns:
- this builder instance
-
build
Constructs theEndpointOAuthinstance.- Returns:
- a new
EndpointOAuth
-