storage

package
v0.0.0-...-c9bb2cb Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthCode

type AuthCode struct {
	// Actual string returned as the "code" value.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The client this code value is valid for. When exchanging the code for a
	// token response, the client must use its client_secret to authenticate.
	ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	// As part of the OAuth2 spec when a client makes a token request it MUST
	// present the same redirect_uri as the initial redirect. This values is saved
	// to make this check.
	//
	// https://tools.ietf.org/html/rfc6749#section-4.1.3
	RedirectUri string `protobuf:"bytes,3,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"`
	// If provided by the client in the initial request, the provider MUST create
	// a ID Token with this nonce in the JWT payload.
	Nonce string `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// Scopes authorized by the end user for the client.
	Scopes []string `protobuf:"bytes,5,rep,name=scopes,proto3" json:"scopes,omitempty"`
	// Authentication data provided by an upstream source.
	ConnectorId          string               `protobuf:"bytes,6,opt,name=connector_id,json=connectorId,proto3" json:"connector_id,omitempty"`
	ConnectorData        []byte               `protobuf:"bytes,7,opt,name=connector_data,json=connectorData,proto3" json:"connector_data,omitempty"`
	Claims               *Claims              `protobuf:"bytes,8,opt,name=claims,proto3" json:"claims,omitempty"`
	Expiry               *timestamp.Timestamp `protobuf:"bytes,9,opt,name=expiry,proto3" json:"expiry,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

AuthCode represents a code which can be exchanged for an OAuth2 token response.

This value is created once an end user has authorized a client, the server has redirect the end user back to the client, but the client hasn't exchanged the code for an access_token and id_token.

func (*AuthCode) Descriptor

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

func (*AuthCode) GetClaims

func (m *AuthCode) GetClaims() *Claims

func (*AuthCode) GetClientId

func (m *AuthCode) GetClientId() string

func (*AuthCode) GetConnectorData

func (m *AuthCode) GetConnectorData() []byte

func (*AuthCode) GetConnectorId

func (m *AuthCode) GetConnectorId() string

func (*AuthCode) GetExpiry

func (m *AuthCode) GetExpiry() *timestamp.Timestamp

func (*AuthCode) GetId

func (m *AuthCode) GetId() string

func (*AuthCode) GetNonce

func (m *AuthCode) GetNonce() string

func (*AuthCode) GetRedirectUri

func (m *AuthCode) GetRedirectUri() string

func (*AuthCode) GetScopes

func (m *AuthCode) GetScopes() []string

func (*AuthCode) ProtoMessage

func (*AuthCode) ProtoMessage()

func (*AuthCode) Reset

func (m *AuthCode) Reset()

func (*AuthCode) String

func (m *AuthCode) String() string

func (*AuthCode) XXX_DiscardUnknown

func (m *AuthCode) XXX_DiscardUnknown()

func (*AuthCode) XXX_Marshal

func (m *AuthCode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AuthCode) XXX_Merge

func (m *AuthCode) XXX_Merge(src proto.Message)

func (*AuthCode) XXX_Size

func (m *AuthCode) XXX_Size() int

func (*AuthCode) XXX_Unmarshal

func (m *AuthCode) XXX_Unmarshal(b []byte) error

type AuthRequest

type AuthRequest struct {
	// ID used to identify the authorization request.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// ID of the client requesting authorization from a user.
	ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	// Values parsed from the initial request. These describe the resources the
	// client is
	// requesting as well as values describing the form of the response.
	ResponseTypes []string `protobuf:"bytes,3,rep,name=response_types,json=responseTypes,proto3" json:"response_types,omitempty"`
	Scopes        []string `protobuf:"bytes,4,rep,name=scopes,proto3" json:"scopes,omitempty"`
	RedirectUri   string   `protobuf:"bytes,5,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"`
	Nonce         string   `protobuf:"bytes,6,opt,name=nonce,proto3" json:"nonce,omitempty"`
	State         string   `protobuf:"bytes,7,opt,name=state,proto3" json:"state,omitempty"`
	// OPTIONAL. Requested Authentication Context Class Reference values.
	// Space-separated string that specifies the acr values that the Authorization
	// Server is being requested to use for processing this Authentication
	// Request, with the values appearing in order of preference.
	// https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest
	AcrValues []string `protobuf:"bytes,14,rep,name=acr_values,json=acrValues,proto3" json:"acr_values,omitempty"`
	// The client has indicated that the end user must be shown an approval prompt
	// on all requests. The server cannot cache their initial action for
	// subsequent attempts.
	ForceApprovalPrompt bool                 `protobuf:"varint,8,opt,name=force_approval_prompt,json=forceApprovalPrompt,proto3" json:"force_approval_prompt,omitempty"`
	Expiry              *timestamp.Timestamp `protobuf:"bytes,9,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// Has the user proved their identity through a backing identity provider?
	//
	// If false, the following fields are invalid.
	LoggedIn bool `protobuf:"varint,10,opt,name=loggedIn,proto3" json:"loggedIn,omitempty"`
	// The identity of the end user. Generally nil until the user authenticates
	// with a backend.
	Claims *Claims `protobuf:"bytes,11,opt,name=claims,proto3" json:"claims,omitempty"`
	// The connector used to login the user and any data the connector wishes to
	// persists. Set when the user authenticates.
	ConnectorId string `protobuf:"bytes,12,opt,name=connector_id,json=connectorId,proto3" json:"connector_id,omitempty"`
	// arbitrary connector data. Usually JSON blob
	ConnectorData        []byte   `protobuf:"bytes,13,opt,name=connector_data,json=connectorData,proto3" json:"connector_data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AuthRequest) Descriptor

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

func (*AuthRequest) GetAcrValues

func (m *AuthRequest) GetAcrValues() []string

func (*AuthRequest) GetClaims

func (m *AuthRequest) GetClaims() *Claims

func (*AuthRequest) GetClientId

func (m *AuthRequest) GetClientId() string

func (*AuthRequest) GetConnectorData

func (m *AuthRequest) GetConnectorData() []byte

func (*AuthRequest) GetConnectorId

func (m *AuthRequest) GetConnectorId() string

func (*AuthRequest) GetExpiry

func (m *AuthRequest) GetExpiry() *timestamp.Timestamp

func (*AuthRequest) GetForceApprovalPrompt

func (m *AuthRequest) GetForceApprovalPrompt() bool

func (*AuthRequest) GetId

func (m *AuthRequest) GetId() string

func (*AuthRequest) GetLoggedIn

func (m *AuthRequest) GetLoggedIn() bool

func (*AuthRequest) GetNonce

func (m *AuthRequest) GetNonce() string

func (*AuthRequest) GetRedirectUri

func (m *AuthRequest) GetRedirectUri() string

func (*AuthRequest) GetResponseTypes

func (m *AuthRequest) GetResponseTypes() []string

func (*AuthRequest) GetScopes

func (m *AuthRequest) GetScopes() []string

func (*AuthRequest) GetState

func (m *AuthRequest) GetState() string

func (*AuthRequest) ProtoMessage

func (*AuthRequest) ProtoMessage()

func (*AuthRequest) Reset

func (m *AuthRequest) Reset()

func (*AuthRequest) String

func (m *AuthRequest) String() string

func (*AuthRequest) XXX_DiscardUnknown

func (m *AuthRequest) XXX_DiscardUnknown()

func (*AuthRequest) XXX_Marshal

func (m *AuthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AuthRequest) XXX_Merge

func (m *AuthRequest) XXX_Merge(src proto.Message)

func (*AuthRequest) XXX_Size

func (m *AuthRequest) XXX_Size() int

func (*AuthRequest) XXX_Unmarshal

func (m *AuthRequest) XXX_Unmarshal(b []byte) error

type Claims

type Claims struct {
	UserId               string                `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Username             string                `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Email                string                `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	EmailVerified        bool                  `protobuf:"varint,4,opt,name=email_verified,json=emailVerified,proto3" json:"email_verified,omitempty"`
	Groups               []string              `protobuf:"bytes,5,rep,name=groups,proto3" json:"groups,omitempty"`
	Acr                  *wrappers.StringValue `protobuf:"bytes,6,opt,name=acr,proto3" json:"acr,omitempty"`
	Amr                  []string              `protobuf:"bytes,7,rep,name=amr,proto3" json:"amr,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

Claims represents the ID Token claims supported by the server.

func (*Claims) Descriptor

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

func (*Claims) GetAcr

func (m *Claims) GetAcr() *wrappers.StringValue

func (*Claims) GetAmr

func (m *Claims) GetAmr() []string

func (*Claims) GetEmail

func (m *Claims) GetEmail() string

func (*Claims) GetEmailVerified

func (m *Claims) GetEmailVerified() bool

func (*Claims) GetGroups

func (m *Claims) GetGroups() []string

func (*Claims) GetUserId

func (m *Claims) GetUserId() string

func (*Claims) GetUsername

func (m *Claims) GetUsername() string

func (*Claims) ProtoMessage

func (*Claims) ProtoMessage()

func (*Claims) Reset

func (m *Claims) Reset()

func (*Claims) String

func (m *Claims) String() string

func (*Claims) XXX_DiscardUnknown

func (m *Claims) XXX_DiscardUnknown()

func (*Claims) XXX_Marshal

func (m *Claims) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Claims) XXX_Merge

func (m *Claims) XXX_Merge(src proto.Message)

func (*Claims) XXX_Size

func (m *Claims) XXX_Size() int

func (*Claims) XXX_Unmarshal

func (m *Claims) XXX_Unmarshal(b []byte) error

type Keys

type Keys struct {
	// Key for creating and verifying signatures. These may be nil. They are
	// store a JWK JSON Blobs
	SigningKey    []byte `protobuf:"bytes,1,opt,name=SigningKey,json=signing_key,proto3" json:"SigningKey,omitempty"`
	SigningKeyPub []byte `protobuf:"bytes,2,opt,name=SigningKeyPub,json=signing_key_pub,proto3" json:"SigningKeyPub,omitempty"`
	// Old signing keys which have been rotated but can still be used to validate
	// existing signatures.
	VerificationKeys []*VerificationKey `protobuf:"bytes,3,rep,name=verification_keys,proto3" json:"verification_keys,omitempty"`
	// The next time the signing key will rotate.
	//
	// For caching purposes, implementations MUST NOT update keys before this
	// time.
	NextRotation         *timestamp.Timestamp `protobuf:"bytes,4,opt,name=next_rotation,proto3" json:"next_rotation,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

Keys hold encryption and signing keys.

func (*Keys) Descriptor

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

func (*Keys) GetNextRotation

func (m *Keys) GetNextRotation() *timestamp.Timestamp

func (*Keys) GetSigningKey

func (m *Keys) GetSigningKey() []byte

func (*Keys) GetSigningKeyPub

func (m *Keys) GetSigningKeyPub() []byte

func (*Keys) GetVerificationKeys

func (m *Keys) GetVerificationKeys() []*VerificationKey

func (*Keys) ProtoMessage

func (*Keys) ProtoMessage()

func (*Keys) Reset

func (m *Keys) Reset()

func (*Keys) String

func (m *Keys) String() string

func (*Keys) XXX_DiscardUnknown

func (m *Keys) XXX_DiscardUnknown()

func (*Keys) XXX_Marshal

func (m *Keys) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Keys) XXX_Merge

func (m *Keys) XXX_Merge(src proto.Message)

func (*Keys) XXX_Size

func (m *Keys) XXX_Size() int

func (*Keys) XXX_Unmarshal

func (m *Keys) XXX_Unmarshal(b []byte) error

type OfflineSessions

type OfflineSessions struct {
	// UserID of an end user who has logged in to the server.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// The ID of the connector used to login the user.
	ConnId string `protobuf:"bytes,2,opt,name=conn_id,json=connId,proto3" json:"conn_id,omitempty"`
	// Refresh is a hash table of refresh token reference objects
	// indexed by the ClientID of the refresh token.
	Refresh              map[string]*RefreshTokenRef `` /* 155-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                    `json:"-"`
	XXX_unrecognized     []byte                      `json:"-"`
	XXX_sizecache        int32                       `json:"-"`
}

OfflineSessions objects are sessions pertaining to users with refresh tokens.

func (*OfflineSessions) Descriptor

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

func (*OfflineSessions) GetConnId

func (m *OfflineSessions) GetConnId() string

func (*OfflineSessions) GetRefresh

func (m *OfflineSessions) GetRefresh() map[string]*RefreshTokenRef

func (*OfflineSessions) GetUserId

func (m *OfflineSessions) GetUserId() string

func (*OfflineSessions) ProtoMessage

func (*OfflineSessions) ProtoMessage()

func (*OfflineSessions) Reset

func (m *OfflineSessions) Reset()

func (*OfflineSessions) String

func (m *OfflineSessions) String() string

func (*OfflineSessions) XXX_DiscardUnknown

func (m *OfflineSessions) XXX_DiscardUnknown()

func (*OfflineSessions) XXX_Marshal

func (m *OfflineSessions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OfflineSessions) XXX_Merge

func (m *OfflineSessions) XXX_Merge(src proto.Message)

func (*OfflineSessions) XXX_Size

func (m *OfflineSessions) XXX_Size() int

func (*OfflineSessions) XXX_Unmarshal

func (m *OfflineSessions) XXX_Unmarshal(b []byte) error

type RefreshToken

type RefreshToken struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// A single token that's rotated every time the refresh token is refreshed.
	//
	// May be empty.
	Token     string               `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	CreatedAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	LastUsed  *timestamp.Timestamp `protobuf:"bytes,4,opt,name=last_used,json=lastUsed,proto3" json:"last_used,omitempty"`
	// Client this refresh token is valid for.
	ClientId string `protobuf:"bytes,5,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	// Authentication data provided by an upstream source.
	ConnectorId   string  `protobuf:"bytes,6,opt,name=connector_id,json=connectorId,proto3" json:"connector_id,omitempty"`
	ConnectorData []byte  `protobuf:"bytes,7,opt,name=connector_data,json=connectorData,proto3" json:"connector_data,omitempty"`
	Claims        *Claims `protobuf:"bytes,8,opt,name=claims,proto3" json:"claims,omitempty"`
	// Scopes present in the initial request. Refresh requests may specify a set
	// of scopes different from the initial request when refreshing a token,
	// however those scopes must be encompassed by this set.
	Scopes []string `protobuf:"bytes,9,rep,name=scopes,proto3" json:"scopes,omitempty"`
	// Nonce value supplied during the initial redirect. This is required to be
	// part of the claims of any future id_token generated by the client.
	Nonce                string   `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

RefreshToken is an OAuth2 refresh token which allows a client to request new tokens on the end user's behalf.

func (*RefreshToken) Descriptor

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

func (*RefreshToken) GetClaims

func (m *RefreshToken) GetClaims() *Claims

func (*RefreshToken) GetClientId

func (m *RefreshToken) GetClientId() string

func (*RefreshToken) GetConnectorData

func (m *RefreshToken) GetConnectorData() []byte

func (*RefreshToken) GetConnectorId

func (m *RefreshToken) GetConnectorId() string

func (*RefreshToken) GetCreatedAt

func (m *RefreshToken) GetCreatedAt() *timestamp.Timestamp

func (*RefreshToken) GetId

func (m *RefreshToken) GetId() string

func (*RefreshToken) GetLastUsed

func (m *RefreshToken) GetLastUsed() *timestamp.Timestamp

func (*RefreshToken) GetNonce

func (m *RefreshToken) GetNonce() string

func (*RefreshToken) GetScopes

func (m *RefreshToken) GetScopes() []string

func (*RefreshToken) GetToken

func (m *RefreshToken) GetToken() string

func (*RefreshToken) ProtoMessage

func (*RefreshToken) ProtoMessage()

func (*RefreshToken) Reset

func (m *RefreshToken) Reset()

func (*RefreshToken) String

func (m *RefreshToken) String() string

func (*RefreshToken) XXX_DiscardUnknown

func (m *RefreshToken) XXX_DiscardUnknown()

func (*RefreshToken) XXX_Marshal

func (m *RefreshToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RefreshToken) XXX_Merge

func (m *RefreshToken) XXX_Merge(src proto.Message)

func (*RefreshToken) XXX_Size

func (m *RefreshToken) XXX_Size() int

func (*RefreshToken) XXX_Unmarshal

func (m *RefreshToken) XXX_Unmarshal(b []byte) error

type RefreshTokenRef

type RefreshTokenRef struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Client the refresh token is valid for.
	ClientId             string               `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	CreatedAt            *timestamp.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	LastUsed             *timestamp.Timestamp `protobuf:"bytes,4,opt,name=last_used,json=lastUsed,proto3" json:"last_used,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*RefreshTokenRef) Descriptor

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

func (*RefreshTokenRef) GetClientId

func (m *RefreshTokenRef) GetClientId() string

func (*RefreshTokenRef) GetCreatedAt

func (m *RefreshTokenRef) GetCreatedAt() *timestamp.Timestamp

func (*RefreshTokenRef) GetId

func (m *RefreshTokenRef) GetId() string

func (*RefreshTokenRef) GetLastUsed

func (m *RefreshTokenRef) GetLastUsed() *timestamp.Timestamp

func (*RefreshTokenRef) ProtoMessage

func (*RefreshTokenRef) ProtoMessage()

func (*RefreshTokenRef) Reset

func (m *RefreshTokenRef) Reset()

func (*RefreshTokenRef) String

func (m *RefreshTokenRef) String() string

func (*RefreshTokenRef) XXX_DiscardUnknown

func (m *RefreshTokenRef) XXX_DiscardUnknown()

func (*RefreshTokenRef) XXX_Marshal

func (m *RefreshTokenRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RefreshTokenRef) XXX_Merge

func (m *RefreshTokenRef) XXX_Merge(src proto.Message)

func (*RefreshTokenRef) XXX_Size

func (m *RefreshTokenRef) XXX_Size() int

func (*RefreshTokenRef) XXX_Unmarshal

func (m *RefreshTokenRef) XXX_Unmarshal(b []byte) error

type VerificationKey

type VerificationKey struct {
	// Stored as JWK JSON blob
	PublicKey            []byte               `protobuf:"bytes,1,opt,name=public_key,proto3" json:"public_key,omitempty"`
	Expiry               *timestamp.Timestamp `protobuf:"bytes,2,opt,name=expiry,proto3" json:"expiry,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

VerificationKey is a rotated signing key which can still be used to verify signatures.

func (*VerificationKey) Descriptor

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

func (*VerificationKey) GetExpiry

func (m *VerificationKey) GetExpiry() *timestamp.Timestamp

func (*VerificationKey) GetPublicKey

func (m *VerificationKey) GetPublicKey() []byte

func (*VerificationKey) ProtoMessage

func (*VerificationKey) ProtoMessage()

func (*VerificationKey) Reset

func (m *VerificationKey) Reset()

func (*VerificationKey) String

func (m *VerificationKey) String() string

func (*VerificationKey) XXX_DiscardUnknown

func (m *VerificationKey) XXX_DiscardUnknown()

func (*VerificationKey) XXX_Marshal

func (m *VerificationKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VerificationKey) XXX_Merge

func (m *VerificationKey) XXX_Merge(src proto.Message)

func (*VerificationKey) XXX_Size

func (m *VerificationKey) XXX_Size() int

func (*VerificationKey) XXX_Unmarshal

func (m *VerificationKey) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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