account

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Account

type Account struct {
	Name        string             `json:"name"`
	Nkey        string             `json:"nkey"`
	Revocations jwt.RevocationList `json:"revocations,omitempty"`
	DefaultTtl  int                `json:"default_ttl,omitempty"`
	MaxTtl      int                `json:"max_ttl,omitempty"`
}

type Paths

type Paths []*framework.Path

func NewPaths

func NewPaths(svc *Service) Paths

type Service

type Service struct {
	Secret UserCredentialsSecret
	Logger hclog.Logger
}

func (*Service) Delete

func (svc *Service) Delete(ctx context.Context, req *logical.Request, fd *framework.FieldData) (*logical.Response, error)

func (*Service) LeaseUserCreds

func (svc *Service) LeaseUserCreds(ctx context.Context, req *logical.Request, fd *framework.FieldData) (*logical.Response, error)

func (*Service) Read

func (*Service) Write

func (svc *Service) Write(ctx context.Context, req *logical.Request, fd *framework.FieldData) (*logical.Response, error)

type UserCredentialsSecret

type UserCredentialsSecret struct {
	*framework.Secret
}

func NewUserCredentialsSecret

func NewUserCredentialsSecret(ucs *UserCredsService) UserCredentialsSecret

type UserCredsService

type UserCredsService struct {
	Logger hclog.Logger
}

func (*UserCredsService) CompactRevocations

func (ucSvc *UserCredsService) CompactRevocations(ctx context.Context, req *logical.Request) error

CompactRevocations will revoke all JWTs created for the account in the last hour period. If any tokens were manually revoked already, they will be compacted to reduce the account JWT's size.

func (*UserCredsService) RenewUserCreds

func (ucSvc *UserCredsService) RenewUserCreds(ctx context.Context, req *logical.Request, fd *framework.FieldData) (*logical.Response, error)

Generates a new JWT with the

func (*UserCredsService) RevokeUserCreds

func (ucSvc *UserCredsService) RevokeUserCreds(ctx context.Context, req *logical.Request, fd *framework.FieldData) (*logical.Response, error)

Revoke the specified user credentials. This will add the user's public key to the account JWT's revocation map

Jump to

Keyboard shortcuts

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