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)

      Source Files