Documentation ¶
Index ¶
- Constants
- Variables
- type OAuth2
- func (x *OAuth2) ClearClientCredentials()
- func (x *OAuth2) ClearFlowType()
- func (x *OAuth2) ClearTokenEndpoint()
- func (x *OAuth2) GetClientCredentials() *OAuth2_ClientCredentials
- func (x *OAuth2) GetFlowType() isOAuth2_FlowType
- func (x *OAuth2) GetScopes() []string
- func (x *OAuth2) GetTokenEndpoint() *v3.HttpUri
- func (x *OAuth2) HasClientCredentials() bool
- func (x *OAuth2) HasFlowType() bool
- func (x *OAuth2) HasTokenEndpoint() bool
- func (*OAuth2) ProtoMessage()
- func (x *OAuth2) ProtoReflect() protoreflect.Message
- func (x *OAuth2) Reset()
- func (x *OAuth2) SetClientCredentials(v *OAuth2_ClientCredentials)
- func (x *OAuth2) SetScopes(v []string)
- func (x *OAuth2) SetTokenEndpoint(v *v3.HttpUri)
- func (x *OAuth2) String() string
- func (x *OAuth2) WhichFlowType() case_OAuth2_FlowType
- type OAuth2_AuthType
- type OAuth2_ClientCredentials
- func (x *OAuth2_ClientCredentials) ClearClientSecret()
- func (x *OAuth2_ClientCredentials) GetAuthType() OAuth2_AuthType
- func (x *OAuth2_ClientCredentials) GetClientId() string
- func (x *OAuth2_ClientCredentials) GetClientSecret() *v31.SdsSecretConfig
- func (x *OAuth2_ClientCredentials) HasClientSecret() bool
- func (*OAuth2_ClientCredentials) ProtoMessage()
- func (x *OAuth2_ClientCredentials) ProtoReflect() protoreflect.Message
- func (x *OAuth2_ClientCredentials) Reset()
- func (x *OAuth2_ClientCredentials) SetAuthType(v OAuth2_AuthType)
- func (x *OAuth2_ClientCredentials) SetClientId(v string)
- func (x *OAuth2_ClientCredentials) SetClientSecret(v *v31.SdsSecretConfig)
- func (x *OAuth2_ClientCredentials) String() string
- type OAuth2_ClientCredentials_
- type OAuth2_ClientCredentials_builder
- type OAuth2_builder
Constants ¶
View Source
const OAuth2_ClientCredentials_case case_OAuth2_FlowType = 3
View Source
const OAuth2_FlowType_not_set_case case_OAuth2_FlowType = 0
Variables ¶
View Source
var ( OAuth2_AuthType_name = map[int32]string{ 0: "BASIC_AUTH", 1: "URL_ENCODED_BODY", } OAuth2_AuthType_value = map[string]int32{ "BASIC_AUTH": 0, "URL_ENCODED_BODY": 1, } )
Enum value maps for OAuth2_AuthType.
View Source
var File_envoy_extensions_injected_credentials_oauth2_v3_oauth2_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type OAuth2 ¶
type OAuth2 struct { // 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. TokenEndpoint *v3.HttpUri `protobuf:"bytes,1,opt,name=token_endpoint,json=tokenEndpoint,proto3" json:"token_endpoint,omitempty"` // 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. Scopes []string `protobuf:"bytes,2,rep,name=scopes,proto3" json:"scopes,omitempty"` // Types that are valid to be assigned to FlowType: // // *OAuth2_ClientCredentials_ FlowType isOAuth2_FlowType `protobuf_oneof:"flow_type"` // contains filtered or unexported fields }
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.
func (*OAuth2) GetClientCredentials ¶
func (x *OAuth2) GetClientCredentials() *OAuth2_ClientCredentials
func (*OAuth2) ProtoReflect ¶
func (x *OAuth2) ProtoReflect() protoreflect.Message
func (*OAuth2) SetClientCredentials ¶
func (x *OAuth2) SetClientCredentials(v *OAuth2_ClientCredentials)
type OAuth2_AuthType ¶
type OAuth2_AuthType int32
const ( // The “client_id“ and “client_secret“ will be sent using HTTP Basic authentication scheme. OAuth2_BASIC_AUTH OAuth2_AuthType = 0 // The “client_id“ and “client_secret“ will be sent in the URL encoded request body. // This type should only be used when Auth server does not support Basic authentication. OAuth2_URL_ENCODED_BODY OAuth2_AuthType = 1 )
func (OAuth2_AuthType) Descriptor ¶
func (OAuth2_AuthType) Descriptor() protoreflect.EnumDescriptor
func (OAuth2_AuthType) Enum ¶
func (x OAuth2_AuthType) Enum() *OAuth2_AuthType
func (OAuth2_AuthType) Number ¶
func (x OAuth2_AuthType) Number() protoreflect.EnumNumber
func (OAuth2_AuthType) String ¶
func (x OAuth2_AuthType) String() string
func (OAuth2_AuthType) Type ¶
func (OAuth2_AuthType) Type() protoreflect.EnumType
type OAuth2_ClientCredentials ¶
type OAuth2_ClientCredentials struct { // Client ID. // Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details. ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` // Client secret. // Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details. ClientSecret *v31.SdsSecretConfig `protobuf:"bytes,2,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"` // The method to use when sending credentials to the authorization server. // Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details. AuthType OAuth2_AuthType `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
Credentials to authenticate client to the authorization server. Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3) for details.
func (*OAuth2_ClientCredentials) ClearClientSecret ¶
func (x *OAuth2_ClientCredentials) ClearClientSecret()
func (*OAuth2_ClientCredentials) GetAuthType ¶
func (x *OAuth2_ClientCredentials) GetAuthType() OAuth2_AuthType
func (*OAuth2_ClientCredentials) GetClientId ¶
func (x *OAuth2_ClientCredentials) GetClientId() string
func (*OAuth2_ClientCredentials) GetClientSecret ¶
func (x *OAuth2_ClientCredentials) GetClientSecret() *v31.SdsSecretConfig
func (*OAuth2_ClientCredentials) HasClientSecret ¶
func (x *OAuth2_ClientCredentials) HasClientSecret() bool
func (*OAuth2_ClientCredentials) ProtoMessage ¶
func (*OAuth2_ClientCredentials) ProtoMessage()
func (*OAuth2_ClientCredentials) ProtoReflect ¶
func (x *OAuth2_ClientCredentials) ProtoReflect() protoreflect.Message
func (*OAuth2_ClientCredentials) Reset ¶
func (x *OAuth2_ClientCredentials) Reset()
func (*OAuth2_ClientCredentials) SetAuthType ¶
func (x *OAuth2_ClientCredentials) SetAuthType(v OAuth2_AuthType)
func (*OAuth2_ClientCredentials) SetClientId ¶
func (x *OAuth2_ClientCredentials) SetClientId(v string)
func (*OAuth2_ClientCredentials) SetClientSecret ¶
func (x *OAuth2_ClientCredentials) SetClientSecret(v *v31.SdsSecretConfig)
func (*OAuth2_ClientCredentials) String ¶
func (x *OAuth2_ClientCredentials) String() string
type OAuth2_ClientCredentials_ ¶
type OAuth2_ClientCredentials_ struct { // 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. ClientCredentials *OAuth2_ClientCredentials `protobuf:"bytes,3,opt,name=client_credentials,json=clientCredentials,proto3,oneof"` }
type OAuth2_ClientCredentials_builder ¶
type OAuth2_ClientCredentials_builder struct { // Client ID. // Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details. ClientId string // Client secret. // Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details. ClientSecret *v31.SdsSecretConfig // The method to use when sending credentials to the authorization server. // Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details. AuthType OAuth2_AuthType // contains filtered or unexported fields }
func (OAuth2_ClientCredentials_builder) Build ¶
func (b0 OAuth2_ClientCredentials_builder) Build() *OAuth2_ClientCredentials
type OAuth2_builder ¶
type OAuth2_builder struct { // 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. TokenEndpoint *v3.HttpUri // 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. Scopes []string // Fields of oneof FlowType: // 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. ClientCredentials *OAuth2_ClientCredentials // contains filtered or unexported fields }
func (OAuth2_builder) Build ¶
func (b0 OAuth2_builder) Build() *OAuth2
Click to show internal directories.
Click to hide internal directories.