java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.extensions.http.injected_credentials.oauth2.v3.OAuth2
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, OAuth2OrBuilder, Serializable

public final class OAuth2 extends com.google.protobuf.GeneratedMessageV3 implements OAuth2OrBuilder
 OAuth2 extension can be used to retrieve an OAuth2 access token from an authorization server and inject it into the
 proxied requests.
 Currently, only the Client Credentials Grant flow is supported.
 The access token will be injected into the request headers using the ``Authorization`` header as a bearer token.
 [#next-free-field: 6]
 
Protobuf type envoy.extensions.http.injected_credentials.oauth2.v3.OAuth2
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Protobuf enum envoy.extensions.http.injected_credentials.oauth2.v3.OAuth2.AuthType
    static final class 
    OAuth2 extension can be used to retrieve an OAuth2 access token from an authorization server and inject it into the proxied requests.
    static final class 
    Credentials to authenticate client to the authorization server.
    static interface 
     
    static final class 
    Optional additional parameters to include in the token endpoint request body.
    static interface 
     
    static enum 
     

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

    com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessageV3

    alwaysUseFieldBuilders, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Client Credentials Grant.
    Client Credentials Grant.
    static OAuth2
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    getEndpointParams(int index)
    Optional list of additional parameters to send to the token endpoint.
    int
    Optional list of additional parameters to send to the token endpoint.
    Optional list of additional parameters to send to the token endpoint.
    Optional list of additional parameters to send to the token endpoint.
    Optional list of additional parameters to send to the token endpoint.
     
    com.google.protobuf.Parser<OAuth2>
     
    getScopes(int index)
    Optional list of OAuth scopes to be claimed in the authorization request.
    com.google.protobuf.ByteString
    getScopesBytes(int index)
    Optional list of OAuth scopes to be claimed in the authorization request.
    int
    Optional list of OAuth scopes to be claimed in the authorization request.
    com.google.protobuf.ProtocolStringList
    Optional list of OAuth scopes to be claimed in the authorization request.
    int
     
    Endpoint on the authorization server to retrieve the access token from.
    Endpoint on the authorization server to retrieve the access token from.
    com.google.protobuf.Duration
    The interval between two successive retries to fetch token from Identity Provider.
    com.google.protobuf.DurationOrBuilder
    The interval between two successive retries to fetch token from Identity Provider.
    boolean
    Client Credentials Grant.
    int
     
    boolean
    Endpoint on the authorization server to retrieve the access token from.
    boolean
    The interval between two successive retries to fetch token from Identity Provider.
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
     
    final boolean
     
     
    newBuilder(OAuth2 prototype)
     
     
    protected OAuth2.Builder
    newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
     
    protected Object
    newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
     
    static OAuth2
     
    static OAuth2
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static OAuth2
    parseFrom(byte[] data)
     
    static OAuth2
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static OAuth2
    parseFrom(com.google.protobuf.ByteString data)
     
    static OAuth2
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static OAuth2
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    static OAuth2
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static OAuth2
     
    static OAuth2
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static OAuth2
     
    static OAuth2
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<OAuth2>
     
     
    void
    writeTo(com.google.protobuf.CodedOutputStream output)
     

    Methods inherited from class com.google.protobuf.GeneratedMessageV3

    canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

    • TOKEN_ENDPOINT_FIELD_NUMBER

      public static final int TOKEN_ENDPOINT_FIELD_NUMBER
      See Also:
    • SCOPES_FIELD_NUMBER

      public static final int SCOPES_FIELD_NUMBER
      See Also:
    • CLIENT_CREDENTIALS_FIELD_NUMBER

      public static final int CLIENT_CREDENTIALS_FIELD_NUMBER
      See Also:
    • TOKEN_FETCH_RETRY_INTERVAL_FIELD_NUMBER

      public static final int TOKEN_FETCH_RETRY_INTERVAL_FIELD_NUMBER
      See Also:
    • ENDPOINT_PARAMS_FIELD_NUMBER

      public static final int ENDPOINT_PARAMS_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • getFlowTypeCase

      public OAuth2.FlowTypeCase getFlowTypeCase()
      Specified by:
      getFlowTypeCase in interface OAuth2OrBuilder
    • hasTokenEndpoint

      public boolean hasTokenEndpoint()
       Endpoint on the authorization server to retrieve the access token from.
       Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-3.2) for details.
       
      .envoy.config.core.v3.HttpUri token_endpoint = 1 [(.validate.rules) = { ... }
      Specified by:
      hasTokenEndpoint in interface OAuth2OrBuilder
      Returns:
      Whether the tokenEndpoint field is set.
    • getTokenEndpoint

      public HttpUri getTokenEndpoint()
       Endpoint on the authorization server to retrieve the access token from.
       Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-3.2) for details.
       
      .envoy.config.core.v3.HttpUri token_endpoint = 1 [(.validate.rules) = { ... }
      Specified by:
      getTokenEndpoint in interface OAuth2OrBuilder
      Returns:
      The tokenEndpoint.
    • getTokenEndpointOrBuilder

      public HttpUriOrBuilder getTokenEndpointOrBuilder()
       Endpoint on the authorization server to retrieve the access token from.
       Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-3.2) for details.
       
      .envoy.config.core.v3.HttpUri token_endpoint = 1 [(.validate.rules) = { ... }
      Specified by:
      getTokenEndpointOrBuilder in interface OAuth2OrBuilder
    • getScopesList

      public com.google.protobuf.ProtocolStringList getScopesList()
       Optional list of OAuth scopes to be claimed in the authorization request.
       Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2) for details.
       
      repeated string scopes = 2;
      Specified by:
      getScopesList in interface OAuth2OrBuilder
      Returns:
      A list containing the scopes.
    • getScopesCount

      public int getScopesCount()
       Optional list of OAuth scopes to be claimed in the authorization request.
       Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2) for details.
       
      repeated string scopes = 2;
      Specified by:
      getScopesCount in interface OAuth2OrBuilder
      Returns:
      The count of scopes.
    • getScopes

      public String getScopes(int index)
       Optional list of OAuth scopes to be claimed in the authorization request.
       Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2) for details.
       
      repeated string scopes = 2;
      Specified by:
      getScopes in interface OAuth2OrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The scopes at the given index.
    • getScopesBytes

      public com.google.protobuf.ByteString getScopesBytes(int index)
       Optional list of OAuth scopes to be claimed in the authorization request.
       Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2) for details.
       
      repeated string scopes = 2;
      Specified by:
      getScopesBytes in interface OAuth2OrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the scopes at the given index.
    • hasClientCredentials

      public boolean hasClientCredentials()
       Client Credentials Grant.
       Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) for details.
       
      .envoy.extensions.http.injected_credentials.oauth2.v3.OAuth2.ClientCredentials client_credentials = 3;
      Specified by:
      hasClientCredentials in interface OAuth2OrBuilder
      Returns:
      Whether the clientCredentials field is set.
    • getClientCredentials

      public OAuth2.ClientCredentials getClientCredentials()
       Client Credentials Grant.
       Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) for details.
       
      .envoy.extensions.http.injected_credentials.oauth2.v3.OAuth2.ClientCredentials client_credentials = 3;
      Specified by:
      getClientCredentials in interface OAuth2OrBuilder
      Returns:
      The clientCredentials.
    • getClientCredentialsOrBuilder

      public OAuth2.ClientCredentialsOrBuilder getClientCredentialsOrBuilder()
       Client Credentials Grant.
       Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) for details.
       
      .envoy.extensions.http.injected_credentials.oauth2.v3.OAuth2.ClientCredentials client_credentials = 3;
      Specified by:
      getClientCredentialsOrBuilder in interface OAuth2OrBuilder
    • hasTokenFetchRetryInterval

      public boolean hasTokenFetchRetryInterval()
       The interval between two successive retries to fetch token from Identity Provider. Default is 2 secs.
       The interval must be at least 1 second.
       
      .google.protobuf.Duration token_fetch_retry_interval = 4 [(.validate.rules) = { ... }
      Specified by:
      hasTokenFetchRetryInterval in interface OAuth2OrBuilder
      Returns:
      Whether the tokenFetchRetryInterval field is set.
    • getTokenFetchRetryInterval

      public com.google.protobuf.Duration getTokenFetchRetryInterval()
       The interval between two successive retries to fetch token from Identity Provider. Default is 2 secs.
       The interval must be at least 1 second.
       
      .google.protobuf.Duration token_fetch_retry_interval = 4 [(.validate.rules) = { ... }
      Specified by:
      getTokenFetchRetryInterval in interface OAuth2OrBuilder
      Returns:
      The tokenFetchRetryInterval.
    • getTokenFetchRetryIntervalOrBuilder

      public com.google.protobuf.DurationOrBuilder getTokenFetchRetryIntervalOrBuilder()
       The interval between two successive retries to fetch token from Identity Provider. Default is 2 secs.
       The interval must be at least 1 second.
       
      .google.protobuf.Duration token_fetch_retry_interval = 4 [(.validate.rules) = { ... }
      Specified by:
      getTokenFetchRetryIntervalOrBuilder in interface OAuth2OrBuilder
    • getEndpointParamsList

      public List<OAuth2.EndpointParameter> getEndpointParamsList()
       Optional list of additional parameters to send to the token endpoint.
       These parameters will be URL-encoded and included in the token request body.
       
      repeated .envoy.extensions.http.injected_credentials.oauth2.v3.OAuth2.EndpointParameter endpoint_params = 5;
      Specified by:
      getEndpointParamsList in interface OAuth2OrBuilder
    • getEndpointParamsOrBuilderList

      public List<? extends OAuth2.EndpointParameterOrBuilder> getEndpointParamsOrBuilderList()
       Optional list of additional parameters to send to the token endpoint.
       These parameters will be URL-encoded and included in the token request body.
       
      repeated .envoy.extensions.http.injected_credentials.oauth2.v3.OAuth2.EndpointParameter endpoint_params = 5;
      Specified by:
      getEndpointParamsOrBuilderList in interface OAuth2OrBuilder
    • getEndpointParamsCount

      public int getEndpointParamsCount()
       Optional list of additional parameters to send to the token endpoint.
       These parameters will be URL-encoded and included in the token request body.
       
      repeated .envoy.extensions.http.injected_credentials.oauth2.v3.OAuth2.EndpointParameter endpoint_params = 5;
      Specified by:
      getEndpointParamsCount in interface OAuth2OrBuilder
    • getEndpointParams

      public OAuth2.EndpointParameter getEndpointParams(int index)
       Optional list of additional parameters to send to the token endpoint.
       These parameters will be URL-encoded and included in the token request body.
       
      repeated .envoy.extensions.http.injected_credentials.oauth2.v3.OAuth2.EndpointParameter endpoint_params = 5;
      Specified by:
      getEndpointParams in interface OAuth2OrBuilder
    • getEndpointParamsOrBuilder

      public OAuth2.EndpointParameterOrBuilder getEndpointParamsOrBuilder(int index)
       Optional list of additional parameters to send to the token endpoint.
       These parameters will be URL-encoded and included in the token request body.
       
      repeated .envoy.extensions.http.injected_credentials.oauth2.v3.OAuth2.EndpointParameter endpoint_params = 5;
      Specified by:
      getEndpointParamsOrBuilder in interface OAuth2OrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static OAuth2 parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OAuth2 parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OAuth2 parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OAuth2 parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OAuth2 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OAuth2 parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OAuth2 parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OAuth2 parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static OAuth2 parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static OAuth2 parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OAuth2 parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OAuth2 parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public OAuth2.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static OAuth2.Builder newBuilder()
    • newBuilder

      public static OAuth2.Builder newBuilder(OAuth2 prototype)
    • toBuilder

      public OAuth2.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected OAuth2.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static OAuth2 getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<OAuth2> parser()
    • getParserForType

      public com.google.protobuf.Parser<OAuth2> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public OAuth2 getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder