securityv1

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AuthN_Type_name = map[int32]string{
		0: "TYPE_UNSPECIFIED",
		1: "TYPE_BASIC",
		2: "TYPE_BEARER",
		3: "TYPE_DIGEST",
		4: "TYPE_OAUTH2",
		5: "TYPE_API_KEY",
		6: "TYPE_JWT",
		7: "TYPE_AUTH_ADDITIONAL",
	}
	AuthN_Type_value = map[string]int32{
		"TYPE_UNSPECIFIED":     0,
		"TYPE_BASIC":           1,
		"TYPE_BEARER":          2,
		"TYPE_DIGEST":          3,
		"TYPE_OAUTH2":          4,
		"TYPE_API_KEY":         5,
		"TYPE_JWT":             6,
		"TYPE_AUTH_ADDITIONAL": 7,
	}
)

Enum value maps for AuthN_Type.

View Source
var (
	AuthErrorReason_name = map[int32]string{
		0:    "AUTH_ERROR_REASON_UNSPECIFIED",
		1001: "AUTH_ERROR_REASON_INVALID_CLAIMS",
		1002: "AUTH_ERROR_REASON_INVALID_BEARER_TOKEN",
		1003: "AUTH_ERROR_REASON_INVALID_SUBJECT",
		1004: "AUTH_ERROR_REASON_INVALID_AUDIENCE",
		1005: "AUTH_ERROR_REASON_INVALID_ISSUER",
		1006: "AUTH_ERROR_REASON_INVALID_EXPIRATION",
		1007: "AUTH_ERROR_REASON_TOKEN_NOT_FOUND",
		1010: "AUTH_ERROR_REASON_BEARER_TOKEN_MISSING",
		1011: "AUTH_ERROR_REASON_TOKEN_EXPIRED",
		1012: "AUTH_ERROR_REASON_UNSUPPORTED_SIGNING_METHOD",
		1014: "AUTH_ERROR_REASON_MISSING_KEY_FUNC",
		1015: "AUTH_ERROR_REASON_SIGN_TOKEN_FAILED",
		1016: "AUTH_ERROR_REASON_GET_KEY_FAILED",
		1050: "AUTH_ERROR_REASON_NO_AT_HASH",
		1051: "AUTH_ERROR_REASON_INVALID_AT_HASH",
		1500: "AUTH_ERROR_REASON_UNAUTHENTICATED",
	}
	AuthErrorReason_value = map[string]int32{
		"AUTH_ERROR_REASON_UNSPECIFIED":                0,
		"AUTH_ERROR_REASON_INVALID_CLAIMS":             1001,
		"AUTH_ERROR_REASON_INVALID_BEARER_TOKEN":       1002,
		"AUTH_ERROR_REASON_INVALID_SUBJECT":            1003,
		"AUTH_ERROR_REASON_INVALID_AUDIENCE":           1004,
		"AUTH_ERROR_REASON_INVALID_ISSUER":             1005,
		"AUTH_ERROR_REASON_INVALID_EXPIRATION":         1006,
		"AUTH_ERROR_REASON_TOKEN_NOT_FOUND":            1007,
		"AUTH_ERROR_REASON_BEARER_TOKEN_MISSING":       1010,
		"AUTH_ERROR_REASON_TOKEN_EXPIRED":              1011,
		"AUTH_ERROR_REASON_UNSUPPORTED_SIGNING_METHOD": 1012,
		"AUTH_ERROR_REASON_MISSING_KEY_FUNC":           1014,
		"AUTH_ERROR_REASON_SIGN_TOKEN_FAILED":          1015,
		"AUTH_ERROR_REASON_GET_KEY_FAILED":             1016,
		"AUTH_ERROR_REASON_NO_AT_HASH":                 1050,
		"AUTH_ERROR_REASON_INVALID_AT_HASH":            1051,
		"AUTH_ERROR_REASON_UNAUTHENTICATED":            1500,
	}
)

Enum value maps for AuthErrorReason.

View Source
var File_security_v1_auth_proto protoreflect.FileDescriptor
View Source
var File_security_v1_casbin_proto protoreflect.FileDescriptor
View Source
var File_security_v1_error_proto protoreflect.FileDescriptor

Functions

func ErrorAuthErrorReasonBearerTokenMissing added in v0.1.0

func ErrorAuthErrorReasonBearerTokenMissing(format string, args ...interface{}) *errors.Error

func ErrorAuthErrorReasonGetKeyFailed added in v0.1.0

func ErrorAuthErrorReasonGetKeyFailed(format string, args ...interface{}) *errors.Error

func ErrorAuthErrorReasonInvalidAtHash added in v0.1.0

func ErrorAuthErrorReasonInvalidAtHash(format string, args ...interface{}) *errors.Error

func ErrorAuthErrorReasonInvalidAudience added in v0.1.0

func ErrorAuthErrorReasonInvalidAudience(format string, args ...interface{}) *errors.Error

func ErrorAuthErrorReasonInvalidBearerToken added in v0.1.0

func ErrorAuthErrorReasonInvalidBearerToken(format string, args ...interface{}) *errors.Error

func ErrorAuthErrorReasonInvalidClaims added in v0.1.0

func ErrorAuthErrorReasonInvalidClaims(format string, args ...interface{}) *errors.Error

func ErrorAuthErrorReasonInvalidExpiration added in v0.1.0

func ErrorAuthErrorReasonInvalidExpiration(format string, args ...interface{}) *errors.Error

func ErrorAuthErrorReasonInvalidIssuer added in v0.1.0

func ErrorAuthErrorReasonInvalidIssuer(format string, args ...interface{}) *errors.Error

func ErrorAuthErrorReasonInvalidSubject added in v0.1.0

func ErrorAuthErrorReasonInvalidSubject(format string, args ...interface{}) *errors.Error

func ErrorAuthErrorReasonMissingKeyFunc added in v0.1.0

func ErrorAuthErrorReasonMissingKeyFunc(format string, args ...interface{}) *errors.Error

func ErrorAuthErrorReasonNoAtHash added in v0.1.0

func ErrorAuthErrorReasonNoAtHash(format string, args ...interface{}) *errors.Error

func ErrorAuthErrorReasonSignTokenFailed added in v0.1.0

func ErrorAuthErrorReasonSignTokenFailed(format string, args ...interface{}) *errors.Error

func ErrorAuthErrorReasonTokenExpired added in v0.1.0

func ErrorAuthErrorReasonTokenExpired(format string, args ...interface{}) *errors.Error

func ErrorAuthErrorReasonTokenNotFound added in v0.1.0

func ErrorAuthErrorReasonTokenNotFound(format string, args ...interface{}) *errors.Error

func ErrorAuthErrorReasonUnauthenticated added in v0.1.0

func ErrorAuthErrorReasonUnauthenticated(format string, args ...interface{}) *errors.Error

func ErrorAuthErrorReasonUnspecified added in v0.1.0

func ErrorAuthErrorReasonUnspecified(format string, args ...interface{}) *errors.Error

func ErrorAuthErrorReasonUnsupportedSigningMethod added in v0.1.0

func ErrorAuthErrorReasonUnsupportedSigningMethod(format string, args ...interface{}) *errors.Error

func IsAuthErrorReasonBearerTokenMissing added in v0.1.0

func IsAuthErrorReasonBearerTokenMissing(err error) bool

func IsAuthErrorReasonGetKeyFailed added in v0.1.0

func IsAuthErrorReasonGetKeyFailed(err error) bool

func IsAuthErrorReasonInvalidAtHash added in v0.1.0

func IsAuthErrorReasonInvalidAtHash(err error) bool

func IsAuthErrorReasonInvalidAudience added in v0.1.0

func IsAuthErrorReasonInvalidAudience(err error) bool

func IsAuthErrorReasonInvalidBearerToken added in v0.1.0

func IsAuthErrorReasonInvalidBearerToken(err error) bool

func IsAuthErrorReasonInvalidClaims added in v0.1.0

func IsAuthErrorReasonInvalidClaims(err error) bool

func IsAuthErrorReasonInvalidExpiration added in v0.1.0

func IsAuthErrorReasonInvalidExpiration(err error) bool

func IsAuthErrorReasonInvalidIssuer added in v0.1.0

func IsAuthErrorReasonInvalidIssuer(err error) bool

func IsAuthErrorReasonInvalidSubject added in v0.1.0

func IsAuthErrorReasonInvalidSubject(err error) bool

func IsAuthErrorReasonMissingKeyFunc added in v0.1.0

func IsAuthErrorReasonMissingKeyFunc(err error) bool

func IsAuthErrorReasonNoAtHash added in v0.1.0

func IsAuthErrorReasonNoAtHash(err error) bool

func IsAuthErrorReasonSignTokenFailed added in v0.1.0

func IsAuthErrorReasonSignTokenFailed(err error) bool

func IsAuthErrorReasonTokenExpired added in v0.1.0

func IsAuthErrorReasonTokenExpired(err error) bool

func IsAuthErrorReasonTokenNotFound added in v0.1.0

func IsAuthErrorReasonTokenNotFound(err error) bool

func IsAuthErrorReasonUnauthenticated added in v0.1.0

func IsAuthErrorReasonUnauthenticated(err error) bool

func IsAuthErrorReasonUnspecified added in v0.1.0

func IsAuthErrorReasonUnspecified(err error) bool

func IsAuthErrorReasonUnsupportedSigningMethod added in v0.1.0

func IsAuthErrorReasonUnsupportedSigningMethod(err error) bool

Types

type ApiKeyAuth

type ApiKeyAuth struct {
	ApiKey string `protobuf:"bytes,1,opt,name=api_key,proto3" json:"api_key,omitempty"`
	// contains filtered or unexported fields
}

func (*ApiKeyAuth) Descriptor deprecated

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

Deprecated: Use ApiKeyAuth.ProtoReflect.Descriptor instead.

func (*ApiKeyAuth) GetApiKey

func (x *ApiKeyAuth) GetApiKey() string

func (*ApiKeyAuth) ProtoMessage

func (*ApiKeyAuth) ProtoMessage()

func (*ApiKeyAuth) ProtoReflect

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

func (*ApiKeyAuth) Reset

func (x *ApiKeyAuth) Reset()

func (*ApiKeyAuth) String

func (x *ApiKeyAuth) String() string

func (*ApiKeyAuth) Validate

func (m *ApiKeyAuth) Validate() error

Validate checks the field values on ApiKeyAuth 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 (*ApiKeyAuth) ValidateAll

func (m *ApiKeyAuth) ValidateAll() error

ValidateAll checks the field values on ApiKeyAuth 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 ApiKeyAuthMultiError, or nil if none found.

type ApiKeyAuthMultiError

type ApiKeyAuthMultiError []error

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

func (ApiKeyAuthMultiError) AllErrors

func (m ApiKeyAuthMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ApiKeyAuthMultiError) Error

func (m ApiKeyAuthMultiError) Error() string

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

type ApiKeyAuthValidationError

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

ApiKeyAuthValidationError is the validation error returned by ApiKeyAuth.Validate if the designated constraints aren't met.

func (ApiKeyAuthValidationError) Cause

func (e ApiKeyAuthValidationError) Cause() error

Cause function returns cause value.

func (ApiKeyAuthValidationError) Error

Error satisfies the builtin error interface

func (ApiKeyAuthValidationError) ErrorName

func (e ApiKeyAuthValidationError) ErrorName() string

ErrorName returns error name.

func (ApiKeyAuthValidationError) Field

Field function returns field value.

func (ApiKeyAuthValidationError) Key

Key function returns key value.

func (ApiKeyAuthValidationError) Reason

func (e ApiKeyAuthValidationError) Reason() string

Reason function returns reason value.

type AuthErrorReason added in v0.1.0

type AuthErrorReason int32
const (
	AuthErrorReason_AUTH_ERROR_REASON_UNSPECIFIED                AuthErrorReason = 0
	AuthErrorReason_AUTH_ERROR_REASON_INVALID_CLAIMS             AuthErrorReason = 1001
	AuthErrorReason_AUTH_ERROR_REASON_INVALID_BEARER_TOKEN       AuthErrorReason = 1002
	AuthErrorReason_AUTH_ERROR_REASON_INVALID_SUBJECT            AuthErrorReason = 1003
	AuthErrorReason_AUTH_ERROR_REASON_INVALID_AUDIENCE           AuthErrorReason = 1004
	AuthErrorReason_AUTH_ERROR_REASON_INVALID_ISSUER             AuthErrorReason = 1005
	AuthErrorReason_AUTH_ERROR_REASON_INVALID_EXPIRATION         AuthErrorReason = 1006
	AuthErrorReason_AUTH_ERROR_REASON_TOKEN_NOT_FOUND            AuthErrorReason = 1007
	AuthErrorReason_AUTH_ERROR_REASON_BEARER_TOKEN_MISSING       AuthErrorReason = 1010
	AuthErrorReason_AUTH_ERROR_REASON_TOKEN_EXPIRED              AuthErrorReason = 1011
	AuthErrorReason_AUTH_ERROR_REASON_UNSUPPORTED_SIGNING_METHOD AuthErrorReason = 1012
	AuthErrorReason_AUTH_ERROR_REASON_MISSING_KEY_FUNC           AuthErrorReason = 1014
	AuthErrorReason_AUTH_ERROR_REASON_SIGN_TOKEN_FAILED          AuthErrorReason = 1015
	AuthErrorReason_AUTH_ERROR_REASON_GET_KEY_FAILED             AuthErrorReason = 1016
	AuthErrorReason_AUTH_ERROR_REASON_NO_AT_HASH                 AuthErrorReason = 1050
	AuthErrorReason_AUTH_ERROR_REASON_INVALID_AT_HASH            AuthErrorReason = 1051
	AuthErrorReason_AUTH_ERROR_REASON_UNAUTHENTICATED            AuthErrorReason = 1500
)

func (AuthErrorReason) Descriptor added in v0.1.0

func (AuthErrorReason) Enum added in v0.1.0

func (x AuthErrorReason) Enum() *AuthErrorReason

func (AuthErrorReason) EnumDescriptor deprecated added in v0.1.0

func (AuthErrorReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use AuthErrorReason.Descriptor instead.

func (AuthErrorReason) Number added in v0.1.0

func (AuthErrorReason) String added in v0.1.0

func (x AuthErrorReason) String() string

func (AuthErrorReason) Type added in v0.1.0

type AuthN

type AuthN struct {
	Type       AuthN_Type  `protobuf:"varint,1,opt,name=type,proto3,enum=security.v1.AuthN_Type" json:"type,omitempty"`
	Basic      *BasicAuth  `protobuf:"bytes,10,opt,name=basic,proto3,oneof" json:"basic,omitempty"`
	Bearer     *BearerAuth `protobuf:"bytes,11,opt,name=bearer,proto3,oneof" json:"bearer,omitempty"`
	Digest     *DigestAuth `protobuf:"bytes,12,opt,name=digest,proto3,oneof" json:"digest,omitempty"`
	Oauth2     *OAuth2Auth `protobuf:"bytes,13,opt,name=oauth2,proto3,oneof" json:"oauth2,omitempty"`
	ApiKey     *ApiKeyAuth `protobuf:"bytes,14,opt,name=api_key,proto3,oneof" json:"api_key,omitempty"`
	Jwt        *JwtAuth    `protobuf:"bytes,15,opt,name=jwt,proto3,oneof" json:"jwt,omitempty"`
	Additional *anypb.Any  `protobuf:"bytes,16,opt,name=additional,proto3,oneof" json:"additional,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthN) Descriptor deprecated

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

Deprecated: Use AuthN.ProtoReflect.Descriptor instead.

func (*AuthN) GetAdditional added in v0.1.0

func (x *AuthN) GetAdditional() *anypb.Any

func (*AuthN) GetApiKey

func (x *AuthN) GetApiKey() *ApiKeyAuth

func (*AuthN) GetBasic

func (x *AuthN) GetBasic() *BasicAuth

func (*AuthN) GetBearer

func (x *AuthN) GetBearer() *BearerAuth

func (*AuthN) GetDigest

func (x *AuthN) GetDigest() *DigestAuth

func (*AuthN) GetJwt

func (x *AuthN) GetJwt() *JwtAuth

func (*AuthN) GetOauth2

func (x *AuthN) GetOauth2() *OAuth2Auth

func (*AuthN) GetType

func (x *AuthN) GetType() AuthN_Type

func (*AuthN) ProtoMessage

func (*AuthN) ProtoMessage()

func (*AuthN) ProtoReflect

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

func (*AuthN) Reset

func (x *AuthN) Reset()

func (*AuthN) String

func (x *AuthN) String() string

func (*AuthN) Validate

func (m *AuthN) Validate() error

Validate checks the field values on AuthN 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 (*AuthN) ValidateAll

func (m *AuthN) ValidateAll() error

ValidateAll checks the field values on AuthN 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 AuthNMultiError, or nil if none found.

type AuthNMultiError

type AuthNMultiError []error

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

func (AuthNMultiError) AllErrors

func (m AuthNMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AuthNMultiError) Error

func (m AuthNMultiError) Error() string

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

type AuthNValidationError

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

AuthNValidationError is the validation error returned by AuthN.Validate if the designated constraints aren't met.

func (AuthNValidationError) Cause

func (e AuthNValidationError) Cause() error

Cause function returns cause value.

func (AuthNValidationError) Error

func (e AuthNValidationError) Error() string

Error satisfies the builtin error interface

func (AuthNValidationError) ErrorName

func (e AuthNValidationError) ErrorName() string

ErrorName returns error name.

func (AuthNValidationError) Field

func (e AuthNValidationError) Field() string

Field function returns field value.

func (AuthNValidationError) Key

func (e AuthNValidationError) Key() bool

Key function returns key value.

func (AuthNValidationError) Reason

func (e AuthNValidationError) Reason() string

Reason function returns reason value.

type AuthN_Type

type AuthN_Type int32
const (
	AuthN_TYPE_UNSPECIFIED AuthN_Type = 0 // default value not specified
	AuthN_TYPE_BASIC       AuthN_Type = 1 // Basic authentication
	AuthN_TYPE_BEARER      AuthN_Type = 2 // Bearer authentication
	AuthN_TYPE_DIGEST      AuthN_Type = 3 // Digest authentication
	AuthN_TYPE_OAUTH2      AuthN_Type = 4 // OAuth2 authentication
	AuthN_TYPE_API_KEY     AuthN_Type = 5 // API Key authentication
	AuthN_TYPE_JWT         AuthN_Type = 6 // JWT authentication
	// you can add more types as needed
	AuthN_TYPE_AUTH_ADDITIONAL AuthN_Type = 7
)

func (AuthN_Type) Descriptor

func (AuthN_Type) Descriptor() protoreflect.EnumDescriptor

func (AuthN_Type) Enum

func (x AuthN_Type) Enum() *AuthN_Type

func (AuthN_Type) EnumDescriptor deprecated

func (AuthN_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use AuthN_Type.Descriptor instead.

func (AuthN_Type) Number

func (x AuthN_Type) Number() protoreflect.EnumNumber

func (AuthN_Type) String

func (x AuthN_Type) String() string

func (AuthN_Type) Type

type AuthZ

type AuthZ struct {
	Root      bool                   `protobuf:"varint,1,opt,name=root,proto3" json:"root,omitempty"`
	Id        string                 `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	UserType  string                 `protobuf:"bytes,3,opt,name=user_type,proto3" json:"user_type,omitempty"`
	Username  string                 `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"`
	Roles     []string               `protobuf:"bytes,5,rep,name=roles,proto3" json:"roles,omitempty"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthZ) Descriptor deprecated

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

Deprecated: Use AuthZ.ProtoReflect.Descriptor instead.

func (*AuthZ) GetId

func (x *AuthZ) GetId() string

func (*AuthZ) GetRoles

func (x *AuthZ) GetRoles() []string

func (*AuthZ) GetRoot

func (x *AuthZ) GetRoot() bool

func (*AuthZ) GetTimestamp

func (x *AuthZ) GetTimestamp() *timestamppb.Timestamp

func (*AuthZ) GetUserType

func (x *AuthZ) GetUserType() string

func (*AuthZ) GetUsername

func (x *AuthZ) GetUsername() string

func (*AuthZ) ProtoMessage

func (*AuthZ) ProtoMessage()

func (*AuthZ) ProtoReflect

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

func (*AuthZ) Reset

func (x *AuthZ) Reset()

func (*AuthZ) String

func (x *AuthZ) String() string

func (*AuthZ) Validate

func (m *AuthZ) Validate() error

Validate checks the field values on AuthZ 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 (*AuthZ) ValidateAll

func (m *AuthZ) ValidateAll() error

ValidateAll checks the field values on AuthZ 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 AuthZMultiError, or nil if none found.

type AuthZMultiError

type AuthZMultiError []error

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

func (AuthZMultiError) AllErrors

func (m AuthZMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AuthZMultiError) Error

func (m AuthZMultiError) Error() string

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

type AuthZValidationError

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

AuthZValidationError is the validation error returned by AuthZ.Validate if the designated constraints aren't met.

func (AuthZValidationError) Cause

func (e AuthZValidationError) Cause() error

Cause function returns cause value.

func (AuthZValidationError) Error

func (e AuthZValidationError) Error() string

Error satisfies the builtin error interface

func (AuthZValidationError) ErrorName

func (e AuthZValidationError) ErrorName() string

ErrorName returns error name.

func (AuthZValidationError) Field

func (e AuthZValidationError) Field() string

Field function returns field value.

func (AuthZValidationError) Key

func (e AuthZValidationError) Key() bool

Key function returns key value.

func (AuthZValidationError) Reason

func (e AuthZValidationError) Reason() string

Reason function returns reason value.

type BasicAuth

type BasicAuth struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*BasicAuth) Descriptor deprecated

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

Deprecated: Use BasicAuth.ProtoReflect.Descriptor instead.

func (*BasicAuth) GetPassword

func (x *BasicAuth) GetPassword() string

func (*BasicAuth) GetUsername

func (x *BasicAuth) GetUsername() string

func (*BasicAuth) ProtoMessage

func (*BasicAuth) ProtoMessage()

func (*BasicAuth) ProtoReflect

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

func (*BasicAuth) Reset

func (x *BasicAuth) Reset()

func (*BasicAuth) String

func (x *BasicAuth) String() string

func (*BasicAuth) Validate

func (m *BasicAuth) Validate() error

Validate checks the field values on BasicAuth 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 (*BasicAuth) ValidateAll

func (m *BasicAuth) ValidateAll() error

ValidateAll checks the field values on BasicAuth 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 BasicAuthMultiError, or nil if none found.

type BasicAuthMultiError

type BasicAuthMultiError []error

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

func (BasicAuthMultiError) AllErrors

func (m BasicAuthMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (BasicAuthMultiError) Error

func (m BasicAuthMultiError) Error() string

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

type BasicAuthValidationError

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

BasicAuthValidationError is the validation error returned by BasicAuth.Validate if the designated constraints aren't met.

func (BasicAuthValidationError) Cause

func (e BasicAuthValidationError) Cause() error

Cause function returns cause value.

func (BasicAuthValidationError) Error

func (e BasicAuthValidationError) Error() string

Error satisfies the builtin error interface

func (BasicAuthValidationError) ErrorName

func (e BasicAuthValidationError) ErrorName() string

ErrorName returns error name.

func (BasicAuthValidationError) Field

func (e BasicAuthValidationError) Field() string

Field function returns field value.

func (BasicAuthValidationError) Key

Key function returns key value.

func (BasicAuthValidationError) Reason

func (e BasicAuthValidationError) Reason() string

Reason function returns reason value.

type BearerAuth

type BearerAuth struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*BearerAuth) Descriptor deprecated

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

Deprecated: Use BearerAuth.ProtoReflect.Descriptor instead.

func (*BearerAuth) GetToken

func (x *BearerAuth) GetToken() string

func (*BearerAuth) ProtoMessage

func (*BearerAuth) ProtoMessage()

func (*BearerAuth) ProtoReflect

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

func (*BearerAuth) Reset

func (x *BearerAuth) Reset()

func (*BearerAuth) String

func (x *BearerAuth) String() string

func (*BearerAuth) Validate

func (m *BearerAuth) Validate() error

Validate checks the field values on BearerAuth 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 (*BearerAuth) ValidateAll

func (m *BearerAuth) ValidateAll() error

ValidateAll checks the field values on BearerAuth 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 BearerAuthMultiError, or nil if none found.

type BearerAuthMultiError

type BearerAuthMultiError []error

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

func (BearerAuthMultiError) AllErrors

func (m BearerAuthMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (BearerAuthMultiError) Error

func (m BearerAuthMultiError) Error() string

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

type BearerAuthValidationError

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

BearerAuthValidationError is the validation error returned by BearerAuth.Validate if the designated constraints aren't met.

func (BearerAuthValidationError) Cause

func (e BearerAuthValidationError) Cause() error

Cause function returns cause value.

func (BearerAuthValidationError) Error

Error satisfies the builtin error interface

func (BearerAuthValidationError) ErrorName

func (e BearerAuthValidationError) ErrorName() string

ErrorName returns error name.

func (BearerAuthValidationError) Field

Field function returns field value.

func (BearerAuthValidationError) Key

Key function returns key value.

func (BearerAuthValidationError) Reason

func (e BearerAuthValidationError) Reason() string

Reason function returns reason value.

type CasbinPolicy

type CasbinPolicy struct {
	Subject string            `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"`
	Object  string            `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
	Action  string            `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"`
	Domain  []string          `protobuf:"bytes,4,rep,name=domain,proto3" json:"domain,omitempty"`
	Claims  *Claims           `protobuf:"bytes,5,opt,name=claims,proto3" json:"claims,omitempty"`
	Extras  map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*CasbinPolicy) Descriptor deprecated

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

Deprecated: Use CasbinPolicy.ProtoReflect.Descriptor instead.

func (*CasbinPolicy) GetAction

func (x *CasbinPolicy) GetAction() string

func (*CasbinPolicy) GetClaims added in v0.1.11

func (x *CasbinPolicy) GetClaims() *Claims

func (*CasbinPolicy) GetDomain

func (x *CasbinPolicy) GetDomain() []string

func (*CasbinPolicy) GetExtras added in v0.1.11

func (x *CasbinPolicy) GetExtras() map[string]string

func (*CasbinPolicy) GetObject

func (x *CasbinPolicy) GetObject() string

func (*CasbinPolicy) GetSubject

func (x *CasbinPolicy) GetSubject() string

func (*CasbinPolicy) ProtoMessage

func (*CasbinPolicy) ProtoMessage()

func (*CasbinPolicy) ProtoReflect

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

func (*CasbinPolicy) Reset

func (x *CasbinPolicy) Reset()

func (*CasbinPolicy) String

func (x *CasbinPolicy) String() string

func (*CasbinPolicy) Validate

func (m *CasbinPolicy) Validate() error

Validate checks the field values on CasbinPolicy 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 (*CasbinPolicy) ValidateAll

func (m *CasbinPolicy) ValidateAll() error

ValidateAll checks the field values on CasbinPolicy 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 CasbinPolicyMultiError, or nil if none found.

type CasbinPolicyMultiError

type CasbinPolicyMultiError []error

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

func (CasbinPolicyMultiError) AllErrors

func (m CasbinPolicyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CasbinPolicyMultiError) Error

func (m CasbinPolicyMultiError) Error() string

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

type CasbinPolicyValidationError

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

CasbinPolicyValidationError is the validation error returned by CasbinPolicy.Validate if the designated constraints aren't met.

func (CasbinPolicyValidationError) Cause

Cause function returns cause value.

func (CasbinPolicyValidationError) Error

Error satisfies the builtin error interface

func (CasbinPolicyValidationError) ErrorName

func (e CasbinPolicyValidationError) ErrorName() string

ErrorName returns error name.

func (CasbinPolicyValidationError) Field

Field function returns field value.

func (CasbinPolicyValidationError) Key

Key function returns key value.

func (CasbinPolicyValidationError) Reason

Reason function returns reason value.

type Claims added in v0.1.0

type Claims struct {
	Sub    string                 `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` // Subject
	Iss    string                 `protobuf:"bytes,2,opt,name=iss,proto3" json:"iss,omitempty"` // Issuer
	Aud    []string               `protobuf:"bytes,3,rep,name=aud,proto3" json:"aud,omitempty"` // Audience
	Exp    *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=exp,proto3" json:"exp,omitempty"` // Expiration Time
	Nbf    *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=nbf,proto3" json:"nbf,omitempty"` // Not Before
	Iat    *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=iat,proto3" json:"iat,omitempty"` // Issued At
	Jti    string                 `protobuf:"bytes,7,opt,name=jti,proto3" json:"jti,omitempty"` // JWT ID
	Scopes map[string]bool        ``                                                            // Scopes
	/* 154-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Claims) Descriptor deprecated added in v0.1.0

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

Deprecated: Use Claims.ProtoReflect.Descriptor instead.

func (*Claims) GetAud added in v0.1.0

func (x *Claims) GetAud() []string

func (*Claims) GetExp added in v0.1.0

func (x *Claims) GetExp() *timestamppb.Timestamp

func (*Claims) GetIat added in v0.1.0

func (x *Claims) GetIat() *timestamppb.Timestamp

func (*Claims) GetIss added in v0.1.0

func (x *Claims) GetIss() string

func (*Claims) GetJti added in v0.1.0

func (x *Claims) GetJti() string

func (*Claims) GetNbf added in v0.1.0

func (x *Claims) GetNbf() *timestamppb.Timestamp

func (*Claims) GetScopes added in v0.1.0

func (x *Claims) GetScopes() map[string]bool

func (*Claims) GetSub added in v0.1.0

func (x *Claims) GetSub() string

func (*Claims) ProtoMessage added in v0.1.0

func (*Claims) ProtoMessage()

func (*Claims) ProtoReflect added in v0.1.0

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

func (*Claims) Reset added in v0.1.0

func (x *Claims) Reset()

func (*Claims) String added in v0.1.0

func (x *Claims) String() string

func (*Claims) Validate added in v0.1.0

func (m *Claims) Validate() error

Validate checks the field values on Claims 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 (*Claims) ValidateAll added in v0.1.0

func (m *Claims) ValidateAll() error

ValidateAll checks the field values on Claims 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 ClaimsMultiError, or nil if none found.

type ClaimsMultiError added in v0.1.0

type ClaimsMultiError []error

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

func (ClaimsMultiError) AllErrors added in v0.1.0

func (m ClaimsMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ClaimsMultiError) Error added in v0.1.0

func (m ClaimsMultiError) Error() string

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

type ClaimsValidationError added in v0.1.0

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

ClaimsValidationError is the validation error returned by Claims.Validate if the designated constraints aren't met.

func (ClaimsValidationError) Cause added in v0.1.0

func (e ClaimsValidationError) Cause() error

Cause function returns cause value.

func (ClaimsValidationError) Error added in v0.1.0

func (e ClaimsValidationError) Error() string

Error satisfies the builtin error interface

func (ClaimsValidationError) ErrorName added in v0.1.0

func (e ClaimsValidationError) ErrorName() string

ErrorName returns error name.

func (ClaimsValidationError) Field added in v0.1.0

func (e ClaimsValidationError) Field() string

Field function returns field value.

func (ClaimsValidationError) Key added in v0.1.0

func (e ClaimsValidationError) Key() bool

Key function returns key value.

func (ClaimsValidationError) Reason added in v0.1.0

func (e ClaimsValidationError) Reason() string

Reason function returns reason value.

type DigestAuth

type DigestAuth struct {
	Username  string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Realm     string `protobuf:"bytes,2,opt,name=realm,proto3" json:"realm,omitempty"`
	Nonce     string `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"`
	Uri       string `protobuf:"bytes,4,opt,name=uri,proto3" json:"uri,omitempty"`
	Response  string `protobuf:"bytes,5,opt,name=response,proto3" json:"response,omitempty"`
	Algorithm string `protobuf:"bytes,6,opt,name=algorithm,proto3" json:"algorithm,omitempty"`
	Qop       string `protobuf:"bytes,7,opt,name=qop,proto3" json:"qop,omitempty"`
	Nc        string `protobuf:"bytes,8,opt,name=nc,proto3" json:"nc,omitempty"`
	Cnonce    string `protobuf:"bytes,9,opt,name=cnonce,proto3" json:"cnonce,omitempty"`
	// contains filtered or unexported fields
}

func (*DigestAuth) Descriptor deprecated

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

Deprecated: Use DigestAuth.ProtoReflect.Descriptor instead.

func (*DigestAuth) GetAlgorithm

func (x *DigestAuth) GetAlgorithm() string

func (*DigestAuth) GetCnonce

func (x *DigestAuth) GetCnonce() string

func (*DigestAuth) GetNc

func (x *DigestAuth) GetNc() string

func (*DigestAuth) GetNonce

func (x *DigestAuth) GetNonce() string

func (*DigestAuth) GetQop

func (x *DigestAuth) GetQop() string

func (*DigestAuth) GetRealm

func (x *DigestAuth) GetRealm() string

func (*DigestAuth) GetResponse

func (x *DigestAuth) GetResponse() string

func (*DigestAuth) GetUri

func (x *DigestAuth) GetUri() string

func (*DigestAuth) GetUsername

func (x *DigestAuth) GetUsername() string

func (*DigestAuth) ProtoMessage

func (*DigestAuth) ProtoMessage()

func (*DigestAuth) ProtoReflect

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

func (*DigestAuth) Reset

func (x *DigestAuth) Reset()

func (*DigestAuth) String

func (x *DigestAuth) String() string

func (*DigestAuth) Validate

func (m *DigestAuth) Validate() error

Validate checks the field values on DigestAuth 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 (*DigestAuth) ValidateAll

func (m *DigestAuth) ValidateAll() error

ValidateAll checks the field values on DigestAuth 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 DigestAuthMultiError, or nil if none found.

type DigestAuthMultiError

type DigestAuthMultiError []error

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

func (DigestAuthMultiError) AllErrors

func (m DigestAuthMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DigestAuthMultiError) Error

func (m DigestAuthMultiError) Error() string

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

type DigestAuthValidationError

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

DigestAuthValidationError is the validation error returned by DigestAuth.Validate if the designated constraints aren't met.

func (DigestAuthValidationError) Cause

func (e DigestAuthValidationError) Cause() error

Cause function returns cause value.

func (DigestAuthValidationError) Error

Error satisfies the builtin error interface

func (DigestAuthValidationError) ErrorName

func (e DigestAuthValidationError) ErrorName() string

ErrorName returns error name.

func (DigestAuthValidationError) Field

Field function returns field value.

func (DigestAuthValidationError) Key

Key function returns key value.

func (DigestAuthValidationError) Reason

func (e DigestAuthValidationError) Reason() string

Reason function returns reason value.

type JwtAuth

type JwtAuth struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*JwtAuth) Descriptor deprecated

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

Deprecated: Use JwtAuth.ProtoReflect.Descriptor instead.

func (*JwtAuth) GetToken

func (x *JwtAuth) GetToken() string

func (*JwtAuth) ProtoMessage

func (*JwtAuth) ProtoMessage()

func (*JwtAuth) ProtoReflect

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

func (*JwtAuth) Reset

func (x *JwtAuth) Reset()

func (*JwtAuth) String

func (x *JwtAuth) String() string

func (*JwtAuth) Validate

func (m *JwtAuth) Validate() error

Validate checks the field values on JwtAuth 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 (*JwtAuth) ValidateAll

func (m *JwtAuth) ValidateAll() error

ValidateAll checks the field values on JwtAuth 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 JwtAuthMultiError, or nil if none found.

type JwtAuthMultiError

type JwtAuthMultiError []error

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

func (JwtAuthMultiError) AllErrors

func (m JwtAuthMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (JwtAuthMultiError) Error

func (m JwtAuthMultiError) Error() string

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

type JwtAuthValidationError

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

JwtAuthValidationError is the validation error returned by JwtAuth.Validate if the designated constraints aren't met.

func (JwtAuthValidationError) Cause

func (e JwtAuthValidationError) Cause() error

Cause function returns cause value.

func (JwtAuthValidationError) Error

func (e JwtAuthValidationError) Error() string

Error satisfies the builtin error interface

func (JwtAuthValidationError) ErrorName

func (e JwtAuthValidationError) ErrorName() string

ErrorName returns error name.

func (JwtAuthValidationError) Field

func (e JwtAuthValidationError) Field() string

Field function returns field value.

func (JwtAuthValidationError) Key

func (e JwtAuthValidationError) Key() bool

Key function returns key value.

func (JwtAuthValidationError) Reason

func (e JwtAuthValidationError) Reason() string

Reason function returns reason value.

type OAuth2Auth

type OAuth2Auth struct {
	AccessToken  string   `protobuf:"bytes,1,opt,name=access_token,proto3" json:"access_token,omitempty"`
	TokenType    string   `protobuf:"bytes,2,opt,name=token_type,proto3" json:"token_type,omitempty"`
	ExpiresIn    int32    `protobuf:"varint,3,opt,name=expires_in,proto3" json:"expires_in,omitempty"`
	RefreshToken string   `protobuf:"bytes,4,opt,name=refresh_token,proto3" json:"refresh_token,omitempty"`
	Scope        []string `protobuf:"bytes,5,rep,name=scope,proto3" json:"scope,omitempty"`
	// contains filtered or unexported fields
}

func (*OAuth2Auth) Descriptor deprecated

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

Deprecated: Use OAuth2Auth.ProtoReflect.Descriptor instead.

func (*OAuth2Auth) GetAccessToken

func (x *OAuth2Auth) GetAccessToken() string

func (*OAuth2Auth) GetExpiresIn

func (x *OAuth2Auth) GetExpiresIn() int32

func (*OAuth2Auth) GetRefreshToken

func (x *OAuth2Auth) GetRefreshToken() string

func (*OAuth2Auth) GetScope

func (x *OAuth2Auth) GetScope() []string

func (*OAuth2Auth) GetTokenType

func (x *OAuth2Auth) GetTokenType() string

func (*OAuth2Auth) ProtoMessage

func (*OAuth2Auth) ProtoMessage()

func (*OAuth2Auth) ProtoReflect

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

func (*OAuth2Auth) Reset

func (x *OAuth2Auth) Reset()

func (*OAuth2Auth) String

func (x *OAuth2Auth) String() string

func (*OAuth2Auth) Validate

func (m *OAuth2Auth) Validate() error

Validate checks the field values on OAuth2Auth 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 (*OAuth2Auth) ValidateAll

func (m *OAuth2Auth) ValidateAll() error

ValidateAll checks the field values on OAuth2Auth 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 OAuth2AuthMultiError, or nil if none found.

type OAuth2AuthMultiError

type OAuth2AuthMultiError []error

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

func (OAuth2AuthMultiError) AllErrors

func (m OAuth2AuthMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (OAuth2AuthMultiError) Error

func (m OAuth2AuthMultiError) Error() string

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

type OAuth2AuthValidationError

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

OAuth2AuthValidationError is the validation error returned by OAuth2Auth.Validate if the designated constraints aren't met.

func (OAuth2AuthValidationError) Cause

func (e OAuth2AuthValidationError) Cause() error

Cause function returns cause value.

func (OAuth2AuthValidationError) Error

Error satisfies the builtin error interface

func (OAuth2AuthValidationError) ErrorName

func (e OAuth2AuthValidationError) ErrorName() string

ErrorName returns error name.

func (OAuth2AuthValidationError) Field

Field function returns field value.

func (OAuth2AuthValidationError) Key

Key function returns key value.

func (OAuth2AuthValidationError) Reason

func (e OAuth2AuthValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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