Documentation ¶
Overview ¶
Package session contains protobuf types for sessions.
Index ¶
- Variables
- func Delete(ctx context.Context, client databroker.DataBrokerServiceClient, ...) error
- func Put(ctx context.Context, client databroker.DataBrokerServiceClient, s *Session) (*databroker.PutResponse, error)
- type IDToken
- func (*IDToken) Descriptor() ([]byte, []int)deprecated
- func (x *IDToken) GetExpiresAt() *timestamppb.Timestamp
- func (x *IDToken) GetIssuedAt() *timestamppb.Timestamp
- func (x *IDToken) GetIssuer() string
- func (x *IDToken) GetRaw() string
- func (x *IDToken) GetSubject() string
- func (*IDToken) ProtoMessage()
- func (x *IDToken) ProtoReflect() protoreflect.Message
- func (x *IDToken) Reset()
- func (x *IDToken) String() string
- type OAuthToken
- func (*OAuthToken) Descriptor() ([]byte, []int)deprecated
- func (x *OAuthToken) GetAccessToken() string
- func (x *OAuthToken) GetExpiresAt() *timestamppb.Timestamp
- func (x *OAuthToken) GetRefreshToken() string
- func (x *OAuthToken) GetTokenType() string
- func (*OAuthToken) ProtoMessage()
- func (x *OAuthToken) ProtoReflect() protoreflect.Message
- func (x *OAuthToken) Reset()
- func (x *OAuthToken) String() string
- type Session
- func (x *Session) AddClaims(claims identity.FlattenedClaims)
- func (*Session) Descriptor() ([]byte, []int)deprecated
- func (x *Session) GetAudience() []string
- func (x *Session) GetClaims() map[string]*structpb.ListValue
- func (x *Session) GetDeviceCredentials() []*Session_DeviceCredential
- func (x *Session) GetExpiresAt() *timestamppb.Timestamp
- func (x *Session) GetId() string
- func (x *Session) GetIdToken() *IDToken
- func (x *Session) GetImpersonateSessionId() string
- func (x *Session) GetIssuedAt() *timestamppb.Timestamp
- func (x *Session) GetOauthToken() *OAuthToken
- func (x *Session) GetUserId() string
- func (x *Session) GetVersion() string
- func (*Session) ProtoMessage()
- func (x *Session) ProtoReflect() protoreflect.Message
- func (x *Session) Reset()
- func (x *Session) SetRawIDToken(rawIDToken string)
- func (x *Session) String() string
- type Session_DeviceCredential
- func (*Session_DeviceCredential) Descriptor() ([]byte, []int)deprecated
- func (m *Session_DeviceCredential) GetCredential() isSession_DeviceCredential_Credential
- func (x *Session_DeviceCredential) GetId() string
- func (x *Session_DeviceCredential) GetTypeId() string
- func (x *Session_DeviceCredential) GetUnavailable() *emptypb.Empty
- func (*Session_DeviceCredential) ProtoMessage()
- func (x *Session_DeviceCredential) ProtoReflect() protoreflect.Message
- func (x *Session_DeviceCredential) Reset()
- func (x *Session_DeviceCredential) String() string
- type Session_DeviceCredential_Id
- type Session_DeviceCredential_Unavailable
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
func Put(ctx context.Context, client databroker.DataBrokerServiceClient, s *Session) (*databroker.PutResponse, error)
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) GetExpiresAt ¶
func (x *IDToken) GetExpiresAt() *timestamppb.Timestamp
func (*IDToken) GetIssuedAt ¶
func (x *IDToken) GetIssuedAt() *timestamppb.Timestamp
func (*IDToken) GetSubject ¶
func (*IDToken) ProtoMessage ¶
func (*IDToken) ProtoMessage()
func (*IDToken) ProtoReflect ¶
func (x *IDToken) ProtoReflect() protoreflect.Message
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"` DeviceCredentials []*Session_DeviceCredential `protobuf:"bytes,17,rep,name=device_credentials,json=deviceCredentials,proto3" json:"device_credentials,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) GetAudience ¶ added in v0.11.0
func (*Session) GetDeviceCredentials ¶ added in v0.15.6
func (x *Session) GetDeviceCredentials() []*Session_DeviceCredential
func (*Session) GetExpiresAt ¶
func (x *Session) GetExpiresAt() *timestamppb.Timestamp
func (*Session) GetIdToken ¶
func (*Session) GetImpersonateSessionId ¶ added in v0.15.0
func (*Session) GetIssuedAt ¶ added in v0.12.2
func (x *Session) GetIssuedAt() *timestamppb.Timestamp
func (*Session) GetOauthToken ¶
func (x *Session) GetOauthToken() *OAuthToken
func (*Session) GetVersion ¶
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
func (*Session) SetRawIDToken ¶ added in v0.11.0
SetRawIDToken sets the raw id token.
type Session_DeviceCredential ¶ added in v0.15.6
type Session_DeviceCredential struct { TypeId string `protobuf:"bytes,1,opt,name=type_id,json=typeId,proto3" json:"type_id,omitempty"` // Types that are assignable to Credential: // *Session_DeviceCredential_Unavailable // *Session_DeviceCredential_Id Credential isSession_DeviceCredential_Credential `protobuf_oneof:"credential"` // contains filtered or unexported fields }
func (*Session_DeviceCredential) Descriptor
deprecated
added in
v0.15.6
func (*Session_DeviceCredential) Descriptor() ([]byte, []int)
Deprecated: Use Session_DeviceCredential.ProtoReflect.Descriptor instead.
func (*Session_DeviceCredential) GetCredential ¶ added in v0.15.6
func (m *Session_DeviceCredential) GetCredential() isSession_DeviceCredential_Credential
func (*Session_DeviceCredential) GetId ¶ added in v0.15.6
func (x *Session_DeviceCredential) GetId() string
func (*Session_DeviceCredential) GetTypeId ¶ added in v0.15.6
func (x *Session_DeviceCredential) GetTypeId() string
func (*Session_DeviceCredential) GetUnavailable ¶ added in v0.15.6
func (x *Session_DeviceCredential) GetUnavailable() *emptypb.Empty
func (*Session_DeviceCredential) ProtoMessage ¶ added in v0.15.6
func (*Session_DeviceCredential) ProtoMessage()
func (*Session_DeviceCredential) ProtoReflect ¶ added in v0.15.6
func (x *Session_DeviceCredential) ProtoReflect() protoreflect.Message
func (*Session_DeviceCredential) Reset ¶ added in v0.15.6
func (x *Session_DeviceCredential) Reset()
func (*Session_DeviceCredential) String ¶ added in v0.15.6
func (x *Session_DeviceCredential) String() string
type Session_DeviceCredential_Id ¶ added in v0.15.6
type Session_DeviceCredential_Id struct {
Id string `protobuf:"bytes,3,opt,name=id,proto3,oneof"`
}
type Session_DeviceCredential_Unavailable ¶ added in v0.15.6
type Session_DeviceCredential_Unavailable struct {
} Click to show internal directories.
Click to hide internal directories.