userstore

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	EXTENDER = ClientType("EXTENDER")
)

ClientType supported values

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient added in v0.3.0

type APIClient struct {
	ID               string              `json:"id,omitempty"`
	Name             string              `json:"name,omitempty"`
	Secret           string              `json:"secret,omitempty"`
	AuthClientID     string              `json:"oauth_client_id"`
	AuthClientSecret string              `json:"oauth_client_secret"`
	Roles            []rolestore.RoleRef `json:"roles,omitempty"`
	Created          string              `json:"created,omitempty"`
	Author           string              `json:"author,omitempty"`
}

APIClient definition

type ClientType

type ClientType string

ClientType is a type of trusted clients

type TrustedClient

type TrustedClient struct {
	ID          string     `json:"id,omitempty"`
	Type        ClientType `json:"type,omitempty"`
	Secret      string     `json:"secret,omitempty"`
	Name        string     `json:"name,omitempty"`
	Permissions []string   `json:"permissions,omitempty"`
	Registered  bool       `json:"registered,omitempty"`
	Enabled     bool       `json:"enabled,omitempty"`
}

TrustedClient definition

func Extender

func Extender(name string) TrustedClient

Extender creates new trusted client

type UserStore

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

UserStore is a role-store client instance.

func New

func New(api restapi.Connector) *UserStore

New creates a new user-store client instance

func (*UserStore) APIClient added in v0.3.0

func (store *UserStore) APIClient(id string) (*APIClient, error)

APIClient returns details about API client

func (*UserStore) APIClients added in v0.3.0

func (store *UserStore) APIClients() ([]APIClient, error)

APIClients returns list of all registered api clients

func (*UserStore) CreateAPIClient added in v0.3.0

func (store *UserStore) CreateAPIClient(name string, roles []string) (string, error)

CreateAPIClient creates new API client

func (*UserStore) CreateTrustedClient

func (store *UserStore) CreateTrustedClient(client TrustedClient) (string, error)

CreateTrustedClient registers new client to PrivX

func (*UserStore) DeleteAPIClient added in v0.3.0

func (store *UserStore) DeleteAPIClient(id string) error

DeleteAPIClient removes existing API client

func (*UserStore) DeleteTrustedClient

func (store *UserStore) DeleteTrustedClient(id string) error

DeleteTrustedClient removes the client

func (*UserStore) TrustedClient

func (store *UserStore) TrustedClient(id string) (*TrustedClient, error)

TrustedClient returns details about the client

func (*UserStore) TrustedClients

func (store *UserStore) TrustedClients() ([]TrustedClient, error)

TrustedClients fetches all known trusted clients

Jump to

Keyboard shortcuts

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