Documentation
¶
Index ¶
- type AuthN
- type AuthNInput
- type AuthNOutput
- type AuthNSessionOutput
- type Blls
- type Session
- func (b *Session) AccessToken(ctx context.Context, input *SessionInput) (*SessionOutput, error)
- func (b *Session) Delete(ctx context.Context, sid util.ID) (*SuccessResponse[bool], error)
- func (b *Session) UserInfo(ctx context.Context, uid util.ID) (*UserInfo, error)
- func (b *Session) Verify(ctx context.Context, input *SessionInput) (*SessionOutput, error)
- type SessionInput
- type SessionOutput
- type SuccessResponse
- type UpdateUserInput
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthN ¶
type AuthN struct {
// contains filtered or unexported fields
}
func (*AuthN) LoginOrNew ¶
func (b *AuthN) LoginOrNew(ctx context.Context, input *AuthNInput) (*AuthNSessionOutput, error)
type AuthNInput ¶
type AuthNInput struct {
Idp string `json:"idp" cbor:"idp"`
Aud string `json:"aud" cbor:"aud"`
Sub string `json:"sub" cbor:"sub"`
ExpiresIn uint `json:"expires_in" cbor:"expires_in"`
Scope []string `json:"scope" cbor:"scope"`
Ip string `json:"ip" cbor:"ip"`
DeviceID string `json:"device_id" cbor:"device_id"`
DeviceDesc string `json:"device_desc" cbor:"device_desc"`
Payload []byte `json:"payload" cbor:"payload"`
User UserInfo `json:"user" cbor:"user"`
}
type AuthNOutput ¶
type AuthNSessionOutput ¶ added in v0.2.0
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) AccessToken ¶
func (b *Session) AccessToken(ctx context.Context, input *SessionInput) (*SessionOutput, error)
func (*Session) Verify ¶
func (b *Session) Verify(ctx context.Context, input *SessionInput) (*SessionOutput, error)
type SessionInput ¶
type SessionOutput ¶
type SessionOutput struct {
SID *util.ID `json:"sid,omitempty" cbor:"sid,omitempty"`
Sub *util.UUID `json:"sub,omitempty" cbor:"sub,omitempty"`
UID *util.ID `json:"uid,omitempty" cbor:"uid,omitempty"`
AccessToken string `json:"access_token,omitempty" cbor:"access_token,omitempty"`
IDToken string `json:"id_token,omitempty" cbor:"id_token,omitempty"`
ExpiresIn uint `json:"expires_in,omitempty" cbor:"expires_in,omitempty"`
}
type SuccessResponse ¶
type SuccessResponse[T any] struct { Result T `json:"result" cbor:"result"` }
type UpdateUserInput ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.