oauthsession

package
v0.0.0-...-81dc835 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DependencySet = wire.NewSet(
	wire.Struct(new(StoreRedis), "*"),
)
View Source
var ErrNotFound = errors.New("oauth session entry not found")
View Source
var UICookieDef = &httputil.CookieDef{
	NameSuffix: "oauth_ui",
	Path:       "/",
	SameSite:   http.SameSiteNoneMode,
}

UICookieDef contains oauth_ui. It is supposed to be set and pop immediately to create a ui session. UICookieDef is deprecated, and will be removed.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	ID string `json:"id,omitempty"`
	T  T      `json:"t,omitempty"`
}

func NewEntry

func NewEntry(t T) *Entry

type SettingsActionResult

type SettingsActionResult struct {
}

func NewSettingsActionResult

func NewSettingsActionResult() *SettingsActionResult

type StoreRedis

type StoreRedis struct {
	Redis *appredis.Handle
	AppID config.AppID
}

func (*StoreRedis) Delete

func (s *StoreRedis) Delete(ctx context.Context, entryID string) (err error)

func (*StoreRedis) Get

func (s *StoreRedis) Get(ctx context.Context, entryID string) (entry *Entry, err error)

func (*StoreRedis) Save

func (s *StoreRedis) Save(ctx context.Context, entry *Entry) (err error)

type T

type T struct {
	AuthorizationRequest protocol.AuthorizationRequest `json:"authorization_request,omitempty"`
	SettingsActionResult *SettingsActionResult         `json:"settings_action_result,omitempty"`
}

Jump to

Keyboard shortcuts

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