Class OAuth2
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
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 ClassesModifier and TypeClassDescriptionstatic enumProtobuf enumenvoy.extensions.http.injected_credentials.oauth2.v3.OAuth2.AuthTypestatic final classOAuth2 extension can be used to retrieve an OAuth2 access token from an authorization server and inject it into the proxied requests.static final classCredentials to authenticate client to the authorization server.static interfacestatic final classOptional additional parameters to include in the token endpoint request body.static interfacestatic enumNested 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
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanClient Credentials Grant.Client Credentials Grant.static OAuth2static final com.google.protobuf.Descriptors.DescriptorgetEndpointParams(int index) Optional list of additional parameters to send to the token endpoint.intOptional list of additional parameters to send to the token endpoint.Optional list of additional parameters to send to the token endpoint.getEndpointParamsOrBuilder(int index) Optional list of additional parameters to send to the token endpoint.List<? extends OAuth2.EndpointParameterOrBuilder>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.ByteStringgetScopesBytes(int index) Optional list of OAuth scopes to be claimed in the authorization request.intOptional list of OAuth scopes to be claimed in the authorization request.com.google.protobuf.ProtocolStringListOptional list of OAuth scopes to be claimed in the authorization request.intEndpoint on the authorization server to retrieve the access token from.Endpoint on the authorization server to retrieve the access token from.com.google.protobuf.DurationThe interval between two successive retries to fetch token from Identity Provider.com.google.protobuf.DurationOrBuilderThe interval between two successive retries to fetch token from Identity Provider.booleanClient Credentials Grant.inthashCode()booleanEndpoint on the authorization server to retrieve the access token from.booleanThe interval between two successive retries to fetch token from Identity Provider.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanstatic OAuth2.Builderstatic OAuth2.BuildernewBuilder(OAuth2 prototype) protected OAuth2.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static OAuth2parseDelimitedFrom(InputStream input) static OAuth2parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static OAuth2parseFrom(byte[] data) static OAuth2parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static OAuth2parseFrom(com.google.protobuf.ByteString data) static OAuth2parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static OAuth2parseFrom(com.google.protobuf.CodedInputStream input) static OAuth2parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static OAuth2parseFrom(InputStream input) static OAuth2parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static OAuth2parseFrom(ByteBuffer data) static OAuth2parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<OAuth2>parser()voidwriteTo(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, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods 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
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getFlowTypeCase
- Specified by:
getFlowTypeCasein interfaceOAuth2OrBuilder
-
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:
hasTokenEndpointin interfaceOAuth2OrBuilder- Returns:
- Whether the tokenEndpoint field is set.
-
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:
getTokenEndpointin interfaceOAuth2OrBuilder- Returns:
- The tokenEndpoint.
-
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:
getTokenEndpointOrBuilderin interfaceOAuth2OrBuilder
-
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:
getScopesListin interfaceOAuth2OrBuilder- 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:
getScopesCountin interfaceOAuth2OrBuilder- Returns:
- The count of scopes.
-
getScopes
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:
getScopesin interfaceOAuth2OrBuilder- 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:
getScopesBytesin interfaceOAuth2OrBuilder- 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:
hasClientCredentialsin interfaceOAuth2OrBuilder- Returns:
- Whether the clientCredentials field is set.
-
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:
getClientCredentialsin interfaceOAuth2OrBuilder- Returns:
- The clientCredentials.
-
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:
getClientCredentialsOrBuilderin interfaceOAuth2OrBuilder
-
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:
hasTokenFetchRetryIntervalin interfaceOAuth2OrBuilder- 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:
getTokenFetchRetryIntervalin interfaceOAuth2OrBuilder- 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:
getTokenFetchRetryIntervalOrBuilderin interfaceOAuth2OrBuilder
-
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:
getEndpointParamsListin interfaceOAuth2OrBuilder
-
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:
getEndpointParamsOrBuilderListin interfaceOAuth2OrBuilder
-
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:
getEndpointParamsCountin interfaceOAuth2OrBuilder
-
getEndpointParams
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:
getEndpointParamsin interfaceOAuth2OrBuilder
-
getEndpointParamsOrBuilder
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:
getEndpointParamsOrBuilderin interfaceOAuth2OrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.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
- Throws:
IOException
-
parseFrom
public static OAuth2 parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static OAuth2 parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static OAuth2 parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected OAuth2.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-