auth

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OryAuth

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

OryAuth is a Vault AuthMethod that can communicate to the Ory plugin

func NewOryAuth

func NewOryAuth(
	mountPath, namespace, object, relation, cookie string,
) (*OryAuth, error)

NewOryAuth creates an OryAuth struct that can be passed into the client.Auth().Login method to authenticate with Vault via the Ory auth plugin.

The mount path should be the path that the plugin was mounted at (probably `ory`) The namespace, object, and relation should reflect the resource being requested The cookie should be the full cookie string, including the name and `=` e.g. `ory_kratos_session=MyReallyLongSessionCookieString`

func (*OryAuth) Login

func (a *OryAuth) Login(ctx context.Context, client *api.Client) (*api.Secret, error)

Login performs a login request to the Ory Vault auth plugin.

Jump to

Keyboard shortcuts

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