manager

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2016 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareHashAndPassword

func CompareHashAndPassword(hashedPassword, password []byte) error

func DefaultSecretGenerator

func DefaultSecretGenerator() ([]byte, error)

Types

type ClientManager

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

ClientManager performs client-related "business-logic" functions on client and related objects. This is in contrast to the Repos which perform little more than CRUD operations.

func NewClientManager

func NewClientManager(clientRepo client.ClientRepo, txnFactory repo.TransactionFactory, options ManagerOptions) *ClientManager

func (*ClientManager) All

func (m *ClientManager) All() ([]client.Client, error)

func (*ClientManager) Authenticate

func (m *ClientManager) Authenticate(creds oidc.ClientCredentials) (bool, error)

func (*ClientManager) Get

func (m *ClientManager) Get(id string) (client.Client, error)

func (*ClientManager) IsDexAdmin

func (m *ClientManager) IsDexAdmin(clientID string) (bool, error)

func (*ClientManager) Metadata

func (m *ClientManager) Metadata(clientID string) (*oidc.ClientMetadata, error)

func (*ClientManager) New

New creates and persists a new client with the given options, returning the generated credentials. Any Credenials provided with the client are ignored and overwritten by the generated ID and Secret. "Normal" (i.e. non-Public) clients must have at least one valid RedirectURI in their Metadata. Public clients must not have any RedirectURIs and must have a client name.

func (*ClientManager) SetDexAdmin

func (m *ClientManager) SetDexAdmin(clientID string, isAdmin bool) error

type ClientOptions

type ClientOptions struct {
	TrustedPeers []string
}

type ManagerOptions

type ManagerOptions struct {
	SecretGenerator   func() ([]byte, error)
	ClientIDGenerator func(string) (string, error)
}

type SecretGenerator

type SecretGenerator func() ([]byte, error)

Jump to

Keyboard shortcuts

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