credentials

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCredentialsApiController

func NewCredentialsApiController(s api.CredentialsApiServicer) api.Router

NewCredentialsApiController creates a default api controller

Types

type CredentialRepository

type CredentialRepository interface {
	// contains filtered or unexported methods
}

func NewCredentialRepository

func NewCredentialRepository(db *sql.DB) CredentialRepository

type CredentialsApiController

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

A CredentialsApiController binds http requests to an api service and writes the service results to the http response

func (*CredentialsApiController) DisableCredentials

func (c *CredentialsApiController) DisableCredentials(w http.ResponseWriter, r *http.Request)

DisableCredentials - Disables a credential so it can't be used anymore to login

func (*CredentialsApiController) ListCredentials

func (c *CredentialsApiController) ListCredentials(w http.ResponseWriter, r *http.Request)

ListCredentials - List the credentials this user has used.

func (*CredentialsApiController) Routes

func (c *CredentialsApiController) Routes() api.Routes

Routes returns all of the api route for the CredentialsApiController

type CredentialsService

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

CredentialsService is a service that implents the logic for the CredentialsApiServicer This service should implement the business logic for every endpoint for the CredentialsApi API. Include any external packages or services that will be required by this service.

func NewCredentialsService

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

NewCredentialsService creates a default api service

func (*CredentialsService) DisableCredentials

func (s *CredentialsService) DisableCredentials(auth tmw.TumblerClaims, identityID string, credentialID string) (*api.Credential, error)

DisableCredentials - Disables a credential so it can't be used anymore to login

func (*CredentialsService) ListCredentials

func (s *CredentialsService) ListCredentials(auth tmw.TumblerClaims, identityID string) ([]api.Credential, error)

ListCredentials - List the credentials this user has used.

func (*CredentialsService) Login

func (s *CredentialsService) Login(login api.Login, nonce string, ip string) (*api.Credential, error)

func (*CredentialsService) Register

func (s *CredentialsService) Register(identityID string, provider string, subjectID string, tenantID string) (*api.Credential, error)

Jump to

Keyboard shortcuts

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