plugin

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory(ctx context.Context, conf *logical.BackendConfig) (logical.Backend, error)

Factory returns a new instance of the Ory auth backend.

func NewPathConfig

func NewPathConfig(b *OryAuthBackend) []*framework.Path

NewPathConfig creates a new path for configuring the backend.

func NewPathLogin

func NewPathLogin(b *OryAuthBackend) []*framework.Path

NewPathLogin returns the path for the login endpoint.

Types

type Config

type Config struct {
	// plugin
	UseSessionExpiryTTL bool `json:"use_session_expiry_ttl,omitempty"`
	TTLSeconds          int  `json:"ttl_seconds,omitempty"`
	MaxTTLSeconds       int  `json:"max_ttl_seconds,omitempty"`

	// Keto encapsulates the keto config (not currently supported)
	KetoHost string `json:"keto_host,omitempty"`

	// Kratos encapsulates the kratos config (not currently supported)
	KratosURL           string            `json:"kratos_url,omitempty"`
	KratosDescription   string            `json:"kratos_description,omitempty"`
	KratosUserAgent     string            `json:"kratos_user_agent,omitempty"`
	KratosDefaultHeader map[string]string `json:"kratos_default_header,omitempty"`
	KratosDebug         bool              `json:"kratos_debug,omitempty"`
}

Config is the configuration for the plugin.

type KetoClient

type KetoClient struct {

	// CheckServiceClient is the client for the Keto Check API.
	CheckServiceClient keto.CheckServiceClient
	// contains filtered or unexported fields
}

KetoClient is a client for the Ory Keto API.

type KetoConfig

type KetoConfig struct {
	TransportConfig *keto.TransportConfig `json:"transport_config,omitempty"`
}

KetoConfig stores the configuration of the Keto API client.

type KratosConfig

type KratosConfig struct {
	Host             string                          `json:"host,omitempty"`
	Scheme           string                          `json:"scheme,omitempty"`
	DefaultHeader    map[string]string               `json:"default_header,omitempty"`
	UserAgent        string                          `json:"user_agent,omitempty"`
	Debug            bool                            `json:"debug,omitempty"`
	Servers          ServerConfigurations            `json:"servers,omitempty"`
	OperationServers map[string]ServerConfigurations `json:"operation_servers,omitempty"`
}

KratosConfig stores the configuration of the Kratos API client.

type OryAuthBackend

type OryAuthBackend struct {
	*framework.Backend
	// contains filtered or unexported fields
}

OryAuthBackend is the backend plugin backed by Ory services.

func NewBackend

func NewBackend() *OryAuthBackend

NewBackend returns a new instance of the Ory-backed auth backend.

func (*OryAuthBackend) Close

func (b *OryAuthBackend) Close()

Close closes the backend.

type ServerConfiguration

type ServerConfiguration struct {
	URL         string                    `json:"url,omitempty"`
	Description string                    `json:"description.omitempty"`
	Variables   map[string]ServerVariable `json:"variables.omitempty"`
}

ServerConfiguration stores the information about a server.

type ServerConfigurations

type ServerConfigurations []ServerConfiguration

ServerConfigurations stores multiple ServerConfiguration items.

type ServerVariable

type ServerVariable struct {
	Description  string   `json:"description,omitempty"`
	DefaultValue string   `json:"default_value,omitempty"`
	EnumValues   []string `json:"enum_values,omitempty"`
}

ServerVariable stores the information about a server variable.

type TransportConfig

type TransportConfig struct {
	Host     string   `json:"host,omitempty"`
	BasePath string   `json:"base_path,omitempty"`
	Schemes  []string `json:"schemes,omitempty"`
}

TransportConfig contains the transport related info.

Jump to

Keyboard shortcuts

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