kratos

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kratos

type Kratos struct {
	Public *oryKratos.APIClient

	Session *KratosSession
	// contains filtered or unexported fields
}

func GetClient

func GetClient() *Kratos

func (*Kratos) Configure

func (k *Kratos) Configure(v any)

func (*Kratos) CreateIdentity

func (k *Kratos) CreateIdentity(user map[string]interface{}, password string) (*oryKratos.Identity, error)

func (*Kratos) DeleteIdentity

func (k *Kratos) DeleteIdentity(id string) error

func (*Kratos) GetAllIdentity

func (k *Kratos) GetAllIdentity() ([]oryKratos.Identity, error)

func (*Kratos) GetIdentity

func (k *Kratos) GetIdentity(id string) (*oryKratos.Identity, error)

func (*Kratos) Name

func (k *Kratos) Name() string

func (*Kratos) ValidateSession

func (k *Kratos) ValidateSession(r *http.Request) (*oryKratos.Session, error)

type KratosConfig

type KratosConfig struct {
	KratosPublicURL string
	KratosAdminURL  string
}

type KratosSession

type KratosSession struct {
	CurrentUser         *oryKratos.Identity
	CurrentSession      *oryKratos.Session
	CurrentCookie       *http.Cookie
	CurrentSessionToken *string
}

func (*KratosSession) SetCurrentCookie

func (s *KratosSession) SetCurrentCookie(cookie *http.Cookie)

func (*KratosSession) SetCurrentSession

func (s *KratosSession) SetCurrentSession(session *oryKratos.Session)

func (*KratosSession) SetCurrentUser

func (s *KratosSession) SetCurrentUser(user *oryKratos.Identity)

func (*KratosSession) SetSession

func (s *KratosSession) SetSession(session *oryKratos.Session)

func (*KratosSession) SetSessionToken

func (s *KratosSession) SetSessionToken(token *string)

Jump to

Keyboard shortcuts

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