operations

package
v0.0.0-...-3ebf473 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SSIKitCreateDID

func SSIKitCreateDID(custodianURL string, v *vault.Vault, userid string) (string, error)

Types

type CredentialSummary

type CredentialSummary struct {
	Id string `json:"id,omitempty"`
}

type EmployeeCredentialData

type EmployeeCredentialData struct {
	Jti                string `json:"jti,omitempty" yaml:"jti" mapstructure:"jti"`
	CredName           string `json:"cred_name,omitempty" mapstructure:"credName"`
	CredType           string `json:"cred_type,omitempty" mapstructure:"credType"`
	IssuerDID          string `json:"iss,omitempty" mapstructure:"issuerDID"`
	SubjectDID         string `json:"did,omitempty" mapstructure:"subjectDID"`
	Name               string `json:"name,omitempty" mapstructure:"name"`
	Given_name         string `json:"given_name,omitempty" mapstructure:"given_name"`
	Family_name        string `json:"family_name,omitempty" mapstructure:"family_name"`
	Preferred_username string `json:"preferred_username,omitempty" mapstructure:"preferred_username"`
	Email              string `json:"email,omitempty" mapstructure:"email"`
	Target             string `json:"target,omitempty"`
	Roles              string `json:"roles,omitempty"`
}

type Manager

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

func NewManager

func NewManager(cfg *yaml.YAML) *Manager

func (*Manager) ConvertToMap

func (m *Manager) ConvertToMap(credIn *EmployeeCredentialData) (map[string]any, error)

func (*Manager) CreateServiceCredential

func (m *Manager) CreateServiceCredential(credIn map[string]any) (string, []byte, error)

func (*Manager) GetAllCredentials

func (m *Manager) GetAllCredentials() ([]CredentialSummary, error)

func (*Manager) GetCredential

func (m *Manager) GetCredential(credID string) (claims string, err error)

func (*Manager) GetCredentialLD

func (m *Manager) GetCredentialLD(credID string) (claims string, err error)

func (*Manager) User

func (m *Manager) User() *User

type RoleForTarget

type RoleForTarget struct {
	Target string   `json:"target,omitempty"`
	Names  []string `json:"names,omitempty"`
}

type User

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

User represents the user model It implements the webauthn.User interface

func (*User) Create

func (u *User) Create(name string, displayName string) (*User, error)

func (*User) CredentialExcludeList

func (u *User) CredentialExcludeList() []protocol.CredentialDescriptor

CredentialExcludeList returns a CredentialDescriptor array filled with all a user's credentials

func (*User) GetByName

func (u *User) GetByName(name string) (*User, error)

GetUser returns a *User by the user's username

func (*User) GetOrCreate

func (u *User) GetOrCreate(name string, displayName string) (*User, error)

func (*User) WebAuthnCredentials

func (u *User) WebAuthnCredentials() []webauthn.Credential

WebAuthnCredentials returns credentials owned by the user

func (User) WebAuthnDisplayName

func (u User) WebAuthnDisplayName() string

WebAuthnDisplayName returns the user's display name

func (User) WebAuthnID

func (u User) WebAuthnID() []byte

WebAuthnID returns the user's ID

func (User) WebAuthnIcon

func (u User) WebAuthnIcon() string

WebAuthnIcon is not (yet) implemented

func (User) WebAuthnName

func (u User) WebAuthnName() string

WebAuthnName returns the user's username

Jump to

Keyboard shortcuts

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