Documentation ¶
Index ¶
- Variables
- type Algorithm
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetEnvironment() string
- func (x *Config) GetProviders() []*Provider
- func (x *Config) GetWhitelistMethods() []string
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- type JwtProvider
- func (*JwtProvider) Descriptor() ([]byte, []int)deprecated
- func (x *JwtProvider) GetAlgorithm() Algorithm
- func (x *JwtProvider) GetAudience() string
- func (x *JwtProvider) GetIssuer() string
- func (x *JwtProvider) GetJwksUri() string
- func (x *JwtProvider) GetRequireClaims() []string
- func (x *JwtProvider) GetSecretEnv() string
- func (*JwtProvider) ProtoMessage()
- func (x *JwtProvider) ProtoReflect() protoreflect.Message
- func (x *JwtProvider) Reset()
- func (x *JwtProvider) String() string
- type Provider
- func (*Provider) Descriptor() ([]byte, []int)deprecated
- func (x *Provider) GetJwt() *JwtProvider
- func (x *Provider) GetName() string
- func (m *Provider) GetProvider() isProvider_Provider
- func (*Provider) ProtoMessage()
- func (x *Provider) ProtoReflect() protoreflect.Message
- func (x *Provider) Reset()
- func (x *Provider) String() string
- type Provider_Jwt
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Algorithm_name = map[int32]string{ 0: "ALGORITHM_UNSPECIFIED", 1: "HS256", 2: "HS384", 3: "HS512", 4: "RS256", 5: "RS384", 6: "RS512", 7: "ES256", 8: "ES384", 9: "ES512", } Algorithm_value = map[string]int32{ "ALGORITHM_UNSPECIFIED": 0, "HS256": 1, "HS384": 2, "HS512": 3, "RS256": 4, "RS384": 5, "RS512": 6, "ES256": 7, "ES384": 8, "ES512": 9, } )
Enum value maps for Algorithm.
View Source
var ( // The authentication configuration for a service method. // // repeated authenticate.Config config = 50042; E_Config = &file_authenticate_authenticate_proto_extTypes[0] )
Extension fields to descriptorpb.ServiceOptions.
View Source
var File_authenticate_authenticate_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Algorithm ¶
type Algorithm int32
Algorithm is the algorithm used to sign a JWT.
const ( Algorithm_ALGORITHM_UNSPECIFIED Algorithm = 0 Algorithm_HS256 Algorithm = 1 Algorithm_HS384 Algorithm = 2 Algorithm_HS512 Algorithm = 3 Algorithm_RS256 Algorithm = 4 Algorithm_RS384 Algorithm = 5 Algorithm_RS512 Algorithm = 6 Algorithm_ES256 Algorithm = 7 Algorithm_ES384 Algorithm = 8 Algorithm_ES512 Algorithm = 9 )
func (Algorithm) Descriptor ¶
func (Algorithm) Descriptor() protoreflect.EnumDescriptor
func (Algorithm) EnumDescriptor
deprecated
func (Algorithm) Number ¶
func (x Algorithm) Number() protoreflect.EnumNumber
func (Algorithm) Type ¶
func (Algorithm) Type() protoreflect.EnumType
type Config ¶
type Config struct { // The authentication configuration for a service method. Providers []*Provider `protobuf:"bytes,50043,rep,name=providers,proto3" json:"providers,omitempty"` // The methods that do not require authentication. WhitelistMethods []string `protobuf:"bytes,50044,rep,name=whitelist_methods,json=whitelistMethods,proto3" json:"whitelist_methods,omitempty"` // environment, if set, only enables the configuration if the config is set to the // same value. This is useful for enabling different authentication in development/production environments. Environment string `protobuf:"bytes,6,opt,name=environment,proto3" json:"environment,omitempty"` // contains filtered or unexported fields }
Config is the authentication configuration for a service
func (*Config) Descriptor
deprecated
func (*Config) GetEnvironment ¶ added in v0.0.1
func (*Config) GetProviders ¶
func (*Config) GetWhitelistMethods ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type JwtProvider ¶
type JwtProvider struct { // The expected JWT issuer. Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` // The expected JWT audience. Audience string `protobuf:"bytes,2,opt,name=audience,proto3" json:"audience,omitempty"` // The expected JWT algorithm. Algorithm Algorithm `protobuf:"varint,3,opt,name=algorithm,proto3,enum=authenticate.Algorithm" json:"algorithm,omitempty"` // The jwks uri to fetch the public key from. JwksUri string `protobuf:"bytes,4,opt,name=jwks_uri,json=jwksUri,proto3" json:"jwks_uri,omitempty"` // The environment variable that contains the secret key to verify the JWT. SecretEnv string `protobuf:"bytes,5,opt,name=secret_env,json=secretEnv,proto3" json:"secret_env,omitempty"` // require_claims, if set, checks that the JWT contains the specified claims. RequireClaims []string `protobuf:"bytes,6,rep,name=require_claims,json=requireClaims,proto3" json:"require_claims,omitempty"` // contains filtered or unexported fields }
JwtProvider is a provider that uses a JWT to authenticate a request.
func (*JwtProvider) Descriptor
deprecated
func (*JwtProvider) Descriptor() ([]byte, []int)
Deprecated: Use JwtProvider.ProtoReflect.Descriptor instead.
func (*JwtProvider) GetAlgorithm ¶
func (x *JwtProvider) GetAlgorithm() Algorithm
func (*JwtProvider) GetAudience ¶
func (x *JwtProvider) GetAudience() string
func (*JwtProvider) GetIssuer ¶
func (x *JwtProvider) GetIssuer() string
func (*JwtProvider) GetJwksUri ¶
func (x *JwtProvider) GetJwksUri() string
func (*JwtProvider) GetRequireClaims ¶
func (x *JwtProvider) GetRequireClaims() []string
func (*JwtProvider) GetSecretEnv ¶
func (x *JwtProvider) GetSecretEnv() string
func (*JwtProvider) ProtoMessage ¶
func (*JwtProvider) ProtoMessage()
func (*JwtProvider) ProtoReflect ¶
func (x *JwtProvider) ProtoReflect() protoreflect.Message
func (*JwtProvider) Reset ¶
func (x *JwtProvider) Reset()
func (*JwtProvider) String ¶
func (x *JwtProvider) String() string
type Provider ¶
type Provider struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Types that are assignable to Provider: // // *Provider_Jwt Provider isProvider_Provider `protobuf_oneof:"provider"` // contains filtered or unexported fields }
Provider is a provider that can be used to authenticate a request.
func (*Provider) Descriptor
deprecated
func (*Provider) GetJwt ¶
func (x *Provider) GetJwt() *JwtProvider
func (*Provider) GetProvider ¶
func (m *Provider) GetProvider() isProvider_Provider
func (*Provider) ProtoMessage ¶
func (*Provider) ProtoMessage()
func (*Provider) ProtoReflect ¶
func (x *Provider) ProtoReflect() protoreflect.Message
type Provider_Jwt ¶
type Provider_Jwt struct { // JwtProvider is a provider that uses a JWT to authenticate a request. Jwt *JwtProvider `protobuf:"bytes,2,opt,name=jwt,proto3,oneof"` }
Click to show internal directories.
Click to hide internal directories.