session

package
v0.15.7 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package session contains protobuf types for sessions.

Index

Constants

This section is empty.

Variables

View Source
var File_session_proto protoreflect.FileDescriptor

Functions

func Delete

func Delete(ctx context.Context, client databroker.DataBrokerServiceClient, sessionID string) error

Delete deletes a session from the databroker.

func Put added in v0.14.0

Put sets a session in the databroker.

Types

type IDToken

type IDToken struct {
	Issuer    string                 `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"`
	Subject   string                 `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
	ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
	IssuedAt  *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=issued_at,json=issuedAt,proto3" json:"issued_at,omitempty"`
	Raw       string                 `protobuf:"bytes,5,opt,name=raw,proto3" json:"raw,omitempty"`
	// contains filtered or unexported fields
}

func (*IDToken) Descriptor deprecated

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

Deprecated: Use IDToken.ProtoReflect.Descriptor instead.

func (*IDToken) GetExpiresAt

func (x *IDToken) GetExpiresAt() *timestamppb.Timestamp

func (*IDToken) GetIssuedAt

func (x *IDToken) GetIssuedAt() *timestamppb.Timestamp

func (*IDToken) GetIssuer

func (x *IDToken) GetIssuer() string

func (*IDToken) GetRaw added in v0.11.0

func (x *IDToken) GetRaw() string

func (*IDToken) GetSubject

func (x *IDToken) GetSubject() string

func (*IDToken) ProtoMessage

func (*IDToken) ProtoMessage()

func (*IDToken) ProtoReflect

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

func (*IDToken) Reset

func (x *IDToken) Reset()

func (*IDToken) String

func (x *IDToken) String() string

type OAuthToken

type OAuthToken struct {
	AccessToken  string                 `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	TokenType    string                 `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"`
	ExpiresAt    *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
	RefreshToken string                 `protobuf:"bytes,4,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	// contains filtered or unexported fields
}

func (*OAuthToken) Descriptor deprecated

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

Deprecated: Use OAuthToken.ProtoReflect.Descriptor instead.

func (*OAuthToken) GetAccessToken

func (x *OAuthToken) GetAccessToken() string

func (*OAuthToken) GetExpiresAt

func (x *OAuthToken) GetExpiresAt() *timestamppb.Timestamp

func (*OAuthToken) GetRefreshToken

func (x *OAuthToken) GetRefreshToken() string

func (*OAuthToken) GetTokenType

func (x *OAuthToken) GetTokenType() string

func (*OAuthToken) ProtoMessage

func (*OAuthToken) ProtoMessage()

func (*OAuthToken) ProtoReflect

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

func (*OAuthToken) Reset

func (x *OAuthToken) Reset()

func (*OAuthToken) String

func (x *OAuthToken) String() string

type Session

type Session struct {
	Version              string                         `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	Id                   string                         `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	UserId               string                         `protobuf:"bytes,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	IssuedAt             *timestamppb.Timestamp         `protobuf:"bytes,14,opt,name=issued_at,json=issuedAt,proto3" json:"issued_at,omitempty"`
	ExpiresAt            *timestamppb.Timestamp         `protobuf:"bytes,4,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
	IdToken              *IDToken                       `protobuf:"bytes,6,opt,name=id_token,json=idToken,proto3" json:"id_token,omitempty"`
	OauthToken           *OAuthToken                    `protobuf:"bytes,7,opt,name=oauth_token,json=oauthToken,proto3" json:"oauth_token,omitempty"`
	Claims               map[string]*structpb.ListValue `` /* 153-byte string literal not displayed */
	Audience             []string                       `protobuf:"bytes,10,rep,name=audience,proto3" json:"audience,omitempty"`
	ImpersonateSessionId *string                        `` /* 130-byte string literal not displayed */
	// contains filtered or unexported fields
}

func Get

func Get(ctx context.Context, client databroker.DataBrokerServiceClient, sessionID string) (*Session, error)

Get gets a session from the databroker.

func (*Session) AddClaims added in v0.11.0

func (x *Session) AddClaims(claims identity.FlattenedClaims)

AddClaims adds the flattened claims to the session.

func (*Session) Descriptor deprecated

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

Deprecated: Use Session.ProtoReflect.Descriptor instead.

func (*Session) GetAudience added in v0.11.0

func (x *Session) GetAudience() []string

func (*Session) GetClaims

func (x *Session) GetClaims() map[string]*structpb.ListValue

func (*Session) GetExpiresAt

func (x *Session) GetExpiresAt() *timestamppb.Timestamp

func (*Session) GetId

func (x *Session) GetId() string

func (*Session) GetIdToken

func (x *Session) GetIdToken() *IDToken

func (*Session) GetImpersonateSessionId added in v0.15.0

func (x *Session) GetImpersonateSessionId() string

func (*Session) GetIssuedAt added in v0.12.2

func (x *Session) GetIssuedAt() *timestamppb.Timestamp

func (*Session) GetOauthToken

func (x *Session) GetOauthToken() *OAuthToken

func (*Session) GetUserId

func (x *Session) GetUserId() string

func (*Session) GetVersion

func (x *Session) GetVersion() string

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) ProtoReflect

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

func (*Session) Reset

func (x *Session) Reset()

func (*Session) SetRawIDToken added in v0.11.0

func (x *Session) SetRawIDToken(rawIDToken string)

SetRawIDToken sets the raw id token.

func (*Session) String

func (x *Session) String() string

Jump to

Keyboard shortcuts

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