kratos

package
v0.0.0-...-e81be6b Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Copyright 2020-2023 Security Onion Solutions, LLC. All rights reserved.

This program is distributed under the terms of version 2 of the GNU General Public License. See LICENSE for further details.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kratos

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

func NewKratos

func NewKratos(srv *server.Server) *Kratos

func (*Kratos) Init

func (kratos *Kratos) Init(cfg module.ModuleConfig) error

func (*Kratos) IsRunning

func (kratos *Kratos) IsRunning() bool

func (*Kratos) PrerequisiteModules

func (kratos *Kratos) PrerequisiteModules() []string

func (*Kratos) Start

func (kratos *Kratos) Start() error

func (*Kratos) Stop

func (kratos *Kratos) Stop() error

type KratosAddress

type KratosAddress struct {
	Id             string    `json:"id"`
	Value          string    `json:"value"`
	ExpirationTime time.Time `json:"expires_at"`
	VerifiedTime   time.Time `json:"verified_at"`
	Verified       bool      `json:"verified"`
	VerifiedVia    string    `json:"via"`
}

func NewAddress

func NewAddress(email string) *KratosAddress

func NewAddresses

func NewAddresses(email string) []*KratosAddress

type KratosCredential

type KratosCredential struct {
	Type        string    `json:"type"`
	Identifiers []string  `json:"identifiers"`
	CreateDate  time.Time `json:"created_at"`
	UpdateDate  time.Time `json:"updated_at"`
}

type KratosPreprocessor

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

func NewKratosPreprocessor

func NewKratosPreprocessor(impl *KratosUserstore) *KratosPreprocessor

func (*KratosPreprocessor) Preprocess

func (proc *KratosPreprocessor) Preprocess(ctx context.Context, request *http.Request) (context.Context, int, error)

func (*KratosPreprocessor) PreprocessPriority

func (proc *KratosPreprocessor) PreprocessPriority() int

type KratosTraits

type KratosTraits struct {
	Email     string `json:"email"`
	FirstName string `json:"firstName"`
	LastName  string `json:"lastName"`
	Note      string `json:"note"`
}

func NewTraits

func NewTraits(email string, firstName string, lastName string, note string) *KratosTraits

type KratosUser

type KratosUser struct {
	Id          string                       `json:"id"`
	SchemaId    string                       `json:"schema_id"`
	SchemaUrl   string                       `json:"schema_url"`
	State       string                       `json:"state"`
	Traits      *KratosTraits                `json:"traits"`
	Addresses   []*KratosAddress             `json:"verifiable_addresses"`
	Credentials map[string]*KratosCredential `json:"credentials"`
	CreateDate  time.Time                    `json:"created_at"`
	UpdateDate  time.Time                    `json:"updated_at"`
}

func NewKratosUser

func NewKratosUser(email string, firstName string, lastName string, note string, state string) *KratosUser

type KratosUserstore

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

func NewKratosUserstore

func NewKratosUserstore(server *server.Server) *KratosUserstore

func (*KratosUserstore) DeleteUser

func (kratos *KratosUserstore) DeleteUser(ctx context.Context, id string) error

func (*KratosUserstore) GetUser

func (kratos *KratosUserstore) GetUser(ctx context.Context, id string) (*model.User, error)

func (*KratosUserstore) GetUsers

func (kratos *KratosUserstore) GetUsers(ctx context.Context) ([]*model.User, error)

func (*KratosUserstore) Init

func (kratos *KratosUserstore) Init(url string) error

func (*KratosUserstore) UpdateUser

func (kratos *KratosUserstore) UpdateUser(ctx context.Context, id string, user *model.User) error

Jump to

Keyboard shortcuts

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