credentials

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCredentialDisabled = errors.New("credential is disabled")
)

Functions

func NewCredentialsApiController

func NewCredentialsApiController(s CredentialsService) common.Controller

NewCredentialsApiController creates a default api controller

Types

type CredentialRepository

type CredentialRepository interface {
	Link(credentialID string, tenantID string, at time.Time) error
	// contains filtered or unexported methods
}

func NewCredentialRepository

func NewCredentialRepository(db *sql.DB) CredentialRepository

type CredentialsService

type CredentialsService interface {
	GetCredential(auth tmw.TumblerClaims, credentialID string) (*client.Credential, error)

	Register(provider string, subjectID string, email string) (*client.Credential, error)
	Login(provider string, subjectID string, email string) (*client.Credential, error)
	Link(credentialID string, tenantID string) error
}

func NewCredentialsService

func NewCredentialsService(time stime.TimeService, repository CredentialRepository) CredentialsService

NewCredentialsService creates a default api service

type Login

type Login struct {
	// OIDC provider that was used to handle authentication of this user.
	ProviderID string `json:"provider,omitempty"`
	// ID of the remote OIDC server gives to this identity
	SubjectID string `json:"subjectID,omitempty"`
}

Login User has authenticated with an OIDC now to verify the system can find them. This verifies theirs stored credentials for a user that match the arguments

func (*Login) LogContext

func (i *Login) LogContext() map[string]string

Jump to

Keyboard shortcuts

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