session

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

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

func New

func New(options options.Options, logger types.Logger) *Session

func (*Session) Register

func (g *Session) Register(prefixes []string, group huma.API)

type SessionInfoResponse

type SessionInfoResponse struct {
	Body SessionInfoResponseBody
}

type SessionInfoResponseBody

type SessionInfoResponseBody struct {
	Identifier   string    `json:"identifier" doc:"session identifier"`
	Name         string    `json:"name" doc:"user's name"`
	Email        string    `json:"email" doc:"user's email address"`
	Organization string    `json:"organization" doc:"user's organization"`
	Role         string    `json:"role" doc:"user's role in the organization"`
	Generation   uint32    `json:"generation" doc:"session generation"`
	ExpiresAt    time.Time `json:"expires_at" doc:"session's expiry time"`
}

type SessionRefreshResponse

type SessionRefreshResponse struct {
	SessionCookie *http.Cookie `header:"Set-Cookie" doc:"session cookie"`
}

type SessionRevokeRequest

type SessionRevokeRequest struct {
	Identifier string `query:"identifier" required:"true" minLength:"36" maxLength:"36" doc:"session identifier"`
}

type SessionRevokeResponse

type SessionRevokeResponse struct {
	Body SessionRevokeResponseBody
}

type SessionRevokeResponseBody

type SessionRevokeResponseBody struct {
	Identifier string    `json:"identifier" doc:"session identifier"`
	Generation uint32    `json:"generation" doc:"session generation"`
	ExpiresAt  time.Time `json:"expires_at" doc:"session expiry time"`
	CreatedAt  time.Time `json:"created_at" doc:"session creation time"`
}

Jump to

Keyboard shortcuts

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