io.vertx.ext.auth.oauth2

## Class OAuth2ClientOptions

- java.lang.Object
- - io.vertx.core.net.NetworkOptions
  - - io.vertx.core.net.TCPSSLOptions
    - - io.vertx.core.net.ClientOptionsBase
      - - io.vertx.core.http.HttpClientOptions
        - - io.vertx.ext.auth.oauth2.OAuth2ClientOptions

-     public class OAuth2ClientOptions
      extends HttpClientOptions

  Options describing how an OAuth2 `HttpClient` will make connections.
  Author:
    Paulo Lopes

- - ### Field Summary

    - ### Fields inherited from class io.vertx.core.http.HttpClientOptions

      `DEFAULT_ALPN_VERSIONS, DEFAULT_DECODER_INITIAL_BUFFER_SIZE, DEFAULT_DEFAULT_HOST, DEFAULT_DEFAULT_PORT, DEFAULT_FORCE_SNI, DEFAULT_HTTP2_CLEAR_TEXT_UPGRADE, DEFAULT_HTTP2_CONNECTION_WINDOW_SIZE, DEFAULT_HTTP2_KEEP_ALIVE_TIMEOUT, DEFAULT_HTTP2_MAX_POOL_SIZE, DEFAULT_HTTP2_MULTIPLEXING_LIMIT, DEFAULT_KEEP_ALIVE, DEFAULT_KEEP_ALIVE_TIMEOUT, DEFAULT_MAX_CHUNK_SIZE, DEFAULT_MAX_HEADER_SIZE, DEFAULT_MAX_INITIAL_LINE_LENGTH, DEFAULT_MAX_POOL_SIZE, DEFAULT_MAX_REDIRECTS, DEFAULT_MAX_WAIT_QUEUE_SIZE, DEFAULT_MAX_WEBSOCKET_FRAME_SIZE, DEFAULT_MAX_WEBSOCKET_MESSAGE_SIZE, DEFAULT_PIPELINING, DEFAULT_PIPELINING_LIMIT, DEFAULT_POOL_CLEANER_PERIOD, DEFAULT_PROTOCOL_VERSION, DEFAULT_SEND_UNMASKED_FRAMES, DEFAULT_TRY_USE_COMPRESSION, DEFAULT_TRY_USE_PER_FRAME_WEBSOCKET_COMPRESSION, DEFAULT_TRY_USE_PER_MESSAGE_WEBSOCKET_COMPRESSION, DEFAULT_VERIFY_HOST, DEFAULT_WEBSOCKET_ALLOW_CLIENT_NO_CONTEXT, DEFAULT_WEBSOCKET_CLOSING_TIMEOUT, DEFAULT_WEBSOCKET_COMPRESSION_LEVEL, DEFAULT_WEBSOCKET_REQUEST_SERVER_NO_CONTEXT`

    - ### Fields inherited from class io.vertx.core.net.ClientOptionsBase

      `DEFAULT_CONNECT_TIMEOUT, DEFAULT_METRICS_NAME, DEFAULT_TRUST_ALL`

    - ### Fields inherited from class io.vertx.core.net.TCPSSLOptions

      `DEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS, DEFAULT_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT_TIME_UNIT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_SSL_ENGINE, DEFAULT_SSL_HANDSHAKE_TIMEOUT, DEFAULT_SSL_HANDSHAKE_TIMEOUT_TIME_UNIT, DEFAULT_TCP_CORK, DEFAULT_TCP_FAST_OPEN, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_USE_ALPN, DEFAULT_USE_POOLED_BUFFERS`

    - ### Fields inherited from class io.vertx.core.net.NetworkOptions

      `DEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OAuth2ClientOptions()` Default constructor
    `OAuth2ClientOptions(HttpClientOptions other)` Copy constructor
    `OAuth2ClientOptions(JsonObject json)` Constructor to create an options from JSON
    `OAuth2ClientOptions(OAuth2ClientOptions other)` Copy constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `OAuth2ClientOptions` | `addPubSecKey(PubSecKeyOptions pubSecKey)`
    `String` | `getAuthorizationPath()` Get the Oauth2 authorization resource path.
    `String` | `getClientID()` Get the provider client id
    `String` | `getClientSecret()` Get the provider client secret
    `String` | `getClientSecretParameterName()` When a provider uses a non standard HTTP form field name, the client secret can be overriden here.
    `JsonObject` | `getExtraParameters()` Extra parameters to send to the provider
    `OAuth2FlowType` | `getFlow()`
    `JsonObject` | `getHeaders()` Custom headers to send along with every request.
    `String` | `getIntrospectionPath()` The provider token introspection resource path
    `String` | `getJwkPath()`
    `JWTOptions` | `getJWTOptions()`
    `String` | `getLogoutPath()` The provider logout path
    `List<PubSecKeyOptions>` | `getPubSecKeys()` The provider PubSec key options
    `String` | `getRevocationPath()` Get the Oauth2 revocation resource path.
    `String` | `getScopeSeparator()` Deprecated.
    `String` | `getSite()`
    `String` | `getTokenPath()` Get the Oauth2 token resource path.
    `String` | `getUserAgent()` The User-Agent header to use when communicating with a provider
    `JsonObject` | `getUserInfoParameters()` Set the provider custom userInfo parameters to send when requesting them.
    `String` | `getUserInfoPath()` The provider userInfo resource path
    `boolean` | `isUseBasicAuthorizationHeader()` Deprecated.
    `boolean` | `isValidateIssuer()`
    `OAuth2ClientOptions` | `setAuthorizationPath(String authorizationPath)`
    `OAuth2ClientOptions` | `setClientID(String clientID)` Set the provider client id
    `OAuth2ClientOptions` | `setClientSecret(String clientSecret)` Set the provider client secret
    `OAuth2ClientOptions` | `setClientSecretParameterName(String clientSecretParameterName)` Override the HTTP form field name for client secret
    `OAuth2ClientOptions` | `setExtraParameters(JsonObject extraParams)` Set extra parameters to be sent to the provider on each request
    `OAuth2ClientOptions` | `setFlow(OAuth2FlowType flow)`
    `OAuth2ClientOptions` | `setHeaders(JsonObject headers)` Set custom headers to be sent with every request to the provider
    `OAuth2ClientOptions` | `setIntrospectionPath(String introspectionPath)` Set the provider token introspection resource path
    `OAuth2ClientOptions` | `setJwkPath(String jwkPath)`
    `OAuth2ClientOptions` | `setJWTOptions(JWTOptions jwtOptions)`
    `OAuth2ClientOptions` | `setLogoutPath(String logoutPath)` Set the provider logout path
    `OAuth2ClientOptions` | `setPubSecKeys(List<PubSecKeyOptions> pubSecKeys)`
    `OAuth2ClientOptions` | `setRevocationPath(String revocationPath)` Set the Oauth2 revocation resource path.
    `OAuth2ClientOptions` | `setScopeSeparator(String scopeSeparator)` Deprecated.
    `OAuth2ClientOptions` | `setSite(String site)` Root URL for the provider
    `OAuth2ClientOptions` | `setTokenPath(String tokenPath)`
    `OAuth2ClientOptions` | `setUseBasicAuthorizationHeader(boolean useBasicAuthorizationHeader)` Deprecated.
    `OAuth2ClientOptions` | `setUserAgent(String userAgent)` Set a custom user agent to use when communicating to a provider
    `OAuth2ClientOptions` | `setUserInfoParameters(JsonObject userInfoParams)` Set custom parameters to be sent during the userInfo resource request
    `OAuth2ClientOptions` | `setUserInfoPath(String userInfoPath)` Set the provider userInfo resource path
    `OAuth2ClientOptions` | `setValidateIssuer(boolean validateIssuer)`

    - ### Methods inherited from class io.vertx.core.http.HttpClientOptions

      `addCrlPath, addCrlValue, addEnabledCipherSuite, addEnabledSecureTransportProtocol, equals, getAlpnVersions, getDecoderInitialBufferSize, getDefaultHost, getDefaultPort, getHttp2ConnectionWindowSize, getHttp2KeepAliveTimeout, getHttp2MaxPoolSize, getHttp2MultiplexingLimit, getInitialSettings, getKeepAliveTimeout, getMaxChunkSize, getMaxHeaderSize, getMaxInitialLineLength, getMaxPoolSize, getMaxRedirects, getMaxWaitQueueSize, getMaxWebsocketFrameSize, getMaxWebSocketFrameSize, getMaxWebsocketMessageSize, getMaxWebSocketMessageSize, getPipeliningLimit, getPoolCleanerPeriod, getProtocolVersion, getTryUsePerMessageWebsocketCompression, getTryUsePerMessageWebSocketCompression, getTryWebsocketDeflateFrameCompression, getTryWebSocketDeflateFrameCompression, getWebSocketClosingTimeout, getWebsocketCompressionAllowClientNoContext, getWebSocketCompressionAllowClientNoContext, getWebsocketCompressionLevel, getWebSocketCompressionLevel, getWebsocketCompressionRequestServerNoContext, getWebSocketCompressionRequestServerNoContext, hashCode, isForceSni, isHttp2ClearTextUpgrade, isKeepAlive, isPipelining, isSendUnmaskedFrames, isTryUseCompression, isVerifyHost, removeEnabledSecureTransportProtocol, setAlpnVersions, setConnectTimeout, setDecoderInitialBufferSize, setDefaultHost, setDefaultPort, setEnabledSecureTransportProtocols, setForceSni, setHttp2ClearTextUpgrade, setHttp2ConnectionWindowSize, setHttp2KeepAliveTimeout, setHttp2MaxPoolSize, setHttp2MultiplexingLimit, setIdleTimeout, setIdleTimeoutUnit, setInitialSettings, setJdkSslEngineOptions, setKeepAlive, setKeepAliveTimeout, setKeyCertOptions, setKeyStoreOptions, setLocalAddress, setLogActivity, setMaxChunkSize, setMaxHeaderSize, setMaxInitialLineLength, setMaxPoolSize, setMaxRedirects, setMaxWaitQueueSize, setMaxWebsocketFrameSize, setMaxWebSocketFrameSize, setMaxWebsocketMessageSize, setMaxWebSocketMessageSize, setMetricsName, setOpenSslEngineOptions, setPemKeyCertOptions, setPemTrustOptions, setPfxKeyCertOptions, setPfxTrustOptions, setPipelining, setPipeliningLimit, setPoolCleanerPeriod, setProtocolVersion, setProxyOptions, setReceiveBufferSize, setReuseAddress, setReusePort, setSendBufferSize, setSendUnmaskedFrames, setSoLinger, setSsl, setSslEngineOptions, setSslHandshakeTimeout, setSslHandshakeTimeoutUnit, setTcpCork, setTcpFastOpen, setTcpKeepAlive, setTcpNoDelay, setTcpQuickAck, setTrafficClass, setTrustAll, setTrustOptions, setTrustStoreOptions, setTryUseCompression, setTryUsePerFrameWebsocketCompression, setTryUsePerFrameWebSocketCompression, setTryUsePerMessageWebsocketCompression, setTryUsePerMessageWebSocketCompression, setUseAlpn, setUsePooledBuffers, setVerifyHost, setWebSocketClosingTimeout, setWebsocketCompressionAllowClientNoContext, setWebSocketCompressionAllowClientNoContext, setWebsocketCompressionLevel, setWebSocketCompressionLevel, setWebsocketCompressionRequestServerNoContext, setWebSocketCompressionRequestServerNoContext, toJson`

    - ### Methods inherited from class io.vertx.core.net.ClientOptionsBase

      `getConnectTimeout, getLocalAddress, getMetricsName, getProxyOptions, isTrustAll`

    - ### Methods inherited from class io.vertx.core.net.TCPSSLOptions

      `getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTrustOptions, getTrustStoreOptions, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn, isUsePooledBuffers`

    - ### Methods inherited from class io.vertx.core.net.NetworkOptions

      `getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePort`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### OAuth2ClientOptions

          public OAuth2ClientOptions()

      Default constructor

    - #### OAuth2ClientOptions

          public OAuth2ClientOptions(HttpClientOptions other)

      Copy constructor
      Parameters:
        `other` - the options to copy

    - #### OAuth2ClientOptions

          public OAuth2ClientOptions(OAuth2ClientOptions other)

      Copy constructor
      Parameters:
        `other` - the options to copy

    - #### OAuth2ClientOptions

          public OAuth2ClientOptions(JsonObject json)

      Constructor to create an options from JSON
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### getSite

          public String getSite()

    - #### getAuthorizationPath

          public String getAuthorizationPath()

      Get the Oauth2 authorization resource path. e.g.: /oauth/authorize
      Returns:
        authorization path

    - #### setAuthorizationPath

          public OAuth2ClientOptions setAuthorizationPath(String authorizationPath)

    - #### getTokenPath

          public String getTokenPath()

      Get the Oauth2 token resource path. e.g.: /oauth/token
      Returns:
        token path

    - #### setTokenPath

          public OAuth2ClientOptions setTokenPath(String tokenPath)

    - #### getRevocationPath

          public String getRevocationPath()

      Get the Oauth2 revocation resource path. e.g.: /oauth/revoke
      Returns:
        revocation path

    - #### setRevocationPath

          public OAuth2ClientOptions setRevocationPath(String revocationPath)

      Set the Oauth2 revocation resource path. e.g.: /oauth/revoke
      Returns:
        self

    - #### isUseBasicAuthorizationHeader

          @Deprecated
          public boolean isUseBasicAuthorizationHeader()

      Deprecated.
      Flag to use HTTP basic auth header with client id, client secret.
      Returns:
        boolean

    - #### setUseBasicAuthorizationHeader

          @Deprecated
          public OAuth2ClientOptions setUseBasicAuthorizationHeader(boolean useBasicAuthorizationHeader)

      Deprecated.
      Flag to use HTTP basic auth header with client id, client secret.
      Returns:
        self

    - #### getClientSecretParameterName

          public String getClientSecretParameterName()

      When a provider uses a non standard HTTP form field name, the client secret can be overriden here.
      Returns:
        the provider form field name

    - #### setClientSecretParameterName

          public OAuth2ClientOptions setClientSecretParameterName(String clientSecretParameterName)

      Override the HTTP form field name for client secret
      Parameters:
        `clientSecretParameterName` - the new nme
      Returns:
        self

    - #### setSite

          public OAuth2ClientOptions setSite(String site)

      Root URL for the provider
      Parameters:
        `site` - a url
      Returns:
        self

    - #### getClientID

          public String getClientID()

      Get the provider client id
      Returns:
        client id

    - #### setClientID

          public OAuth2ClientOptions setClientID(String clientID)

      Set the provider client id
      Parameters:
        `clientID` - client id
      Returns:
        self

    - #### getClientSecret

          public String getClientSecret()

      Get the provider client secret
      Returns:
        the client secret

    - #### setClientSecret

          public OAuth2ClientOptions setClientSecret(String clientSecret)

      Set the provider client secret
      Parameters:
        `clientSecret` - client secret
      Returns:
        self

    - #### getUserAgent

          public String getUserAgent()

      The User-Agent header to use when communicating with a provider
      Returns:
        the user agent string

    - #### setUserAgent

          public OAuth2ClientOptions setUserAgent(String userAgent)

      Set a custom user agent to use when communicating to a provider
      Parameters:
        `userAgent` - the user agent
      Returns:
        self

    - #### getHeaders

          public JsonObject getHeaders()

      Custom headers to send along with every request.
      Returns:
        the headers as a json structure

    - #### setHeaders

          public OAuth2ClientOptions setHeaders(JsonObject headers)

      Set custom headers to be sent with every request to the provider
      Parameters:
        `headers` - the headers
      Returns:
        self

    - #### getPubSecKeys

          public List<PubSecKeyOptions> getPubSecKeys()

      The provider PubSec key options
      Returns:
        the pub sec key options

    - #### setPubSecKeys

          public OAuth2ClientOptions setPubSecKeys(List<PubSecKeyOptions> pubSecKeys)

    - #### addPubSecKey

          public OAuth2ClientOptions addPubSecKey(PubSecKeyOptions pubSecKey)

    - #### getLogoutPath

          public String getLogoutPath()

      The provider logout path
      Returns:
        a logout resource path

    - #### setLogoutPath

          public OAuth2ClientOptions setLogoutPath(String logoutPath)

      Set the provider logout path
      Parameters:
        `logoutPath` - a logout resource path
      Returns:
        self

    - #### getUserInfoPath

          public String getUserInfoPath()

      The provider userInfo resource path
      Returns:
        a resouce path

    - #### setUserInfoPath

          public OAuth2ClientOptions setUserInfoPath(String userInfoPath)

      Set the provider userInfo resource path
      Parameters:
        `userInfoPath` - a resource path
      Returns:
        self

    - #### getScopeSeparator

          @Deprecated
          public String getScopeSeparator()

      Deprecated.
      Set the provider scope separator
      Returns:
        a single character string usually a space or a plus

    - #### setScopeSeparator

          @Deprecated
          public OAuth2ClientOptions setScopeSeparator(String scopeSeparator)

      Deprecated.
      Set the provider scope separator
      Parameters:
        `scopeSeparator` - a separator e.g.: ' ', '+', ','
      Returns:
        self

    - #### getExtraParameters

          public JsonObject getExtraParameters()

      Extra parameters to send to the provider
      Returns:
        a json representation of the parameters

    - #### setExtraParameters

          public OAuth2ClientOptions setExtraParameters(JsonObject extraParams)

      Set extra parameters to be sent to the provider on each request
      Parameters:
        `extraParams` - a json representation of the parameters
      Returns:
        self

    - #### getIntrospectionPath

          public String getIntrospectionPath()

      The provider token introspection resource path
      Returns:
        the resource path

    - #### setIntrospectionPath

          public OAuth2ClientOptions setIntrospectionPath(String introspectionPath)

      Set the provider token introspection resource path
      Parameters:
        `introspectionPath` - a resource path
      Returns:
        self

    - #### getUserInfoParameters

          public JsonObject getUserInfoParameters()

      Set the provider custom userInfo parameters to send when requesting them.
      Returns:
        a json representation of the extra parameters

    - #### setUserInfoParameters

          public OAuth2ClientOptions setUserInfoParameters(JsonObject userInfoParams)

      Set custom parameters to be sent during the userInfo resource request
      Parameters:
        `userInfoParams` - json representation of the parameters
      Returns:
        self

    - #### getJwkPath

          public String getJwkPath()

    - #### setJwkPath

          public OAuth2ClientOptions setJwkPath(String jwkPath)

    - #### getJWTOptions

          public JWTOptions getJWTOptions()

    - #### setJWTOptions

          public OAuth2ClientOptions setJWTOptions(JWTOptions jwtOptions)

    - #### getFlow

          public OAuth2FlowType getFlow()

    - #### setFlow

          public OAuth2ClientOptions setFlow(OAuth2FlowType flow)

    - #### isValidateIssuer

          public boolean isValidateIssuer()

    - #### setValidateIssuer

          public OAuth2ClientOptions setValidateIssuer(boolean validateIssuer)

Copyright © 2022 Eclipse. All rights reserved.