oidc

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Name = "oidc"
)

Variables

View Source
var File_types_plugins_oidc_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Config

type Config struct {
	ClientId     string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	ClientSecret string `protobuf:"bytes,2,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
	// The issuer is the URL identifier for the service. For example: "https://accounts.google.com"
	// or "https://login.salesforce.com".
	Issuer string `protobuf:"bytes,3,opt,name=issuer,proto3" json:"issuer,omitempty"`
	// The configured URL MUST exactly match one of the Redirection URI values
	// for the Client pre-registered at the OpenID Provider
	RedirectUrl string   `protobuf:"bytes,4,opt,name=redirect_url,json=redirectUrl,proto3" json:"redirect_url,omitempty"`
	Scopes      []string `protobuf:"bytes,5,rep,name=scopes,proto3" json:"scopes,omitempty"`
	// This option is provided to skip the nonce verification. It is designed for local development.
	SkipNonceVerify bool `protobuf:"varint,6,opt,name=skip_nonce_verify,json=skipNonceVerify,proto3" json:"skip_nonce_verify,omitempty"`
	// Default to "x-id-token"
	IdTokenHeader string `protobuf:"bytes,7,opt,name=id_token_header,json=idTokenHeader,proto3" json:"id_token_header,omitempty"`
	// The timeout to wait for the OIDC provider to respond. Default to 3s.
	Timeout                   *durationpb.Duration `protobuf:"bytes,8,opt,name=timeout,proto3" json:"timeout,omitempty"`
	DisableAccessTokenRefresh bool                 `` /* 141-byte string literal not displayed */
	// The duration to determines how earlier a token should be considered
	// expired than its actual expiration time. It is used to avoid late
	// expirations due to client-server time mismatches. Default to 10s.
	AccessTokenRefreshLeeway *durationpb.Duration `` /* 138-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetAccessTokenRefreshLeeway

func (x *Config) GetAccessTokenRefreshLeeway() *durationpb.Duration

func (*Config) GetClientId

func (x *Config) GetClientId() string

func (*Config) GetClientSecret

func (x *Config) GetClientSecret() string

func (*Config) GetDisableAccessTokenRefresh

func (x *Config) GetDisableAccessTokenRefresh() bool

func (*Config) GetIdTokenHeader

func (x *Config) GetIdTokenHeader() string

func (*Config) GetIssuer

func (x *Config) GetIssuer() string

func (*Config) GetRedirectUrl

func (x *Config) GetRedirectUrl() string

func (*Config) GetScopes

func (x *Config) GetScopes() []string

func (*Config) GetSkipNonceVerify

func (x *Config) GetSkipNonceVerify() bool

func (*Config) GetTimeout

func (x *Config) GetTimeout() *durationpb.Duration

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

func (*Config) Validate

func (m *Config) Validate() error

Validate checks the field values on Config with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Config) ValidateAll

func (m *Config) ValidateAll() error

ValidateAll checks the field values on Config with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConfigMultiError, or nil if none found.

type ConfigMultiError

type ConfigMultiError []error

ConfigMultiError is an error wrapping multiple validation errors returned by Config.ValidateAll() if the designated constraints aren't met.

func (ConfigMultiError) AllErrors

func (m ConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ConfigMultiError) Error

func (m ConfigMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ConfigValidationError

type ConfigValidationError struct {
	// contains filtered or unexported fields
}

ConfigValidationError is the validation error returned by Config.Validate if the designated constraints aren't met.

func (ConfigValidationError) Cause

func (e ConfigValidationError) Cause() error

Cause function returns cause value.

func (ConfigValidationError) Error

func (e ConfigValidationError) Error() string

Error satisfies the builtin error interface

func (ConfigValidationError) ErrorName

func (e ConfigValidationError) ErrorName() string

ErrorName returns error name.

func (ConfigValidationError) Field

func (e ConfigValidationError) Field() string

Field function returns field value.

func (ConfigValidationError) Key

func (e ConfigValidationError) Key() bool

Key function returns key value.

func (ConfigValidationError) Reason

func (e ConfigValidationError) Reason() string

Reason function returns reason value.

type Plugin

type Plugin struct {
	plugins.PluginMethodDefaultImpl
}

func (*Plugin) Config

func (p *Plugin) Config() api.PluginConfig

func (*Plugin) Order

func (p *Plugin) Order() plugins.PluginOrder

func (*Plugin) Type

func (p *Plugin) Type() plugins.PluginType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL