Documentation ¶
Index ¶
- Constants
- func SaveUser(user User) error
- type Authenticator
- type SlackRequest
- type User
- func (u *User) DeleteSessionData(userID string) error
- func (u *User) GetCredentials(userID string) []webauthn.Credential
- func (u *User) GetSessionData(userID string) (*webauthn.SessionData, error)
- func (u *User) GetUserByID(userID string) (webauthn.User, error)
- func (u *User) SaveCredentials(userID string, credentials *webauthn.Credential) error
- func (u *User) SaveSessionData(userID string, sessionData *webauthn.SessionData) error
- func (u *User) WebAuthnCredentials() []webauthn.Credential
- func (u *User) WebAuthnDisplayName() string
- func (u *User) WebAuthnID() []byte
- func (u *User) WebAuthnIcon() string
- func (u *User) WebAuthnName() string
- type UserStore
- type VerifyRequest
- func (vr *VerifyRequest) Done() error
- func (vr *VerifyRequest) DoneWithError(errorString string) error
- func (vr *VerifyRequest) Get() error
- func (vr *VerifyRequest) GetOIDCInfo() (*oidc.UserInfo, error)
- func (vr *VerifyRequest) PrepareForSave()
- func (vr *VerifyRequest) Save() error
- func (vr *VerifyRequest) SetOIDCInfo(info *oidc.UserInfo) error
Constants ¶
View Source
const ( VeriflowUsersTable = "VeriflowUsers" VeriflowWebAuthnSessionTable = "VeriflowWebAuthnSessions" VeriflowRequestsTable = "VeriflowRequests" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Authenticator ¶
type SlackRequest ¶
type SlackRequest struct { UserID string `json:"user_id"` ResponseURL string `json:"response_url"` RecipientID string `json:"recipient_id"` Text string `json:"text"` MessageTS string `json:"message_ts"` Channel string `json:"channel"` InitMessageTS string `json:"init_message_ts"` InitChannel string `json:"init_channel"` }
type User ¶
type User struct { ID string `dynamodbav:"id"` Name string `dynamodbav:"name"` Email string `dynamodbav:"email"` Image string `dynamodbav:"image"` Authenticator Authenticator `dynamodbav:"authenticator"` CredentialsJSON string `dynamodbav:"credentialsJSON"` Credentials []webauthn.Credential `dynamodbav:"-"` }
func GetOrCreateUser ¶
func GetUserByEmail ¶
func (*User) DeleteSessionData ¶
func (*User) GetCredentials ¶
func (u *User) GetCredentials(userID string) []webauthn.Credential
func (*User) GetSessionData ¶
func (u *User) GetSessionData(userID string) (*webauthn.SessionData, error)
func (*User) SaveCredentials ¶
func (u *User) SaveCredentials(userID string, credentials *webauthn.Credential) error
func (*User) SaveSessionData ¶
func (u *User) SaveSessionData(userID string, sessionData *webauthn.SessionData) error
func (*User) WebAuthnCredentials ¶
func (u *User) WebAuthnCredentials() []webauthn.Credential
func (*User) WebAuthnDisplayName ¶
func (*User) WebAuthnID ¶
func (*User) WebAuthnIcon ¶
func (*User) WebAuthnName ¶
type UserStore ¶
type UserStore interface { GetUserByID(userID string) (webauthn.User, error) SaveSessionData(userID string, sessionData *webauthn.SessionData) error GetSessionData(userID string) (*webauthn.SessionData, error) DeleteSessionData(userID string) error SaveCredentials(userID string, credential *webauthn.Credential) error GetCredentials(userID string) []webauthn.Credential }
func NewUserStore ¶
func NewUserStore() UserStore
type VerifyRequest ¶
type VerifyRequest struct { ID string `dynamodbav:"id"` RequestorEmail string `dynamodbav:"requestor_email"` Start time.Time `dynamodbav:"start_time"` End time.Time `dynamodbav:"end_time,omitempty"` CommunicationTool string `dynamodbav:"communication_tool"` Status string `dynamodbav:"status"` Requestor User `dynamodbav:"requestor"` Recipient User `dynamodbav:"recipient"` Message string `dynamodbav:"message"` Error string `dynamodbav:"error,omitempty"` OIDCInfo string `dynamodbav:"user_info,omitempty"` StatusLink string `dynamodbav:"status_link"` AuthLink string `dynamodbav:"auth_link"` ReportLink string `dynamodbav:"report_link"` Slack SlackRequest `json:"slack" dynamodbav:"slack"` Permalink string `json:"permalink" dynamodbav:"permalink"` DurationSinceStart string `json:"duration_since_start" dynamodbav:"-"` Duration string `json:"duration" dynamodbav:"-"` }
func GetAllByRecipientEmail ¶
func GetAllByRecipientEmail(email string) ([]VerifyRequest, error)
func GetAllByUser ¶
func GetAllByUser(email string) ([]VerifyRequest, error)
func GetByID ¶
func GetByID(id string) (VerifyRequest, error)
func (*VerifyRequest) Done ¶
func (vr *VerifyRequest) Done() error
func (*VerifyRequest) DoneWithError ¶
func (vr *VerifyRequest) DoneWithError(errorString string) error
func (*VerifyRequest) Get ¶
func (vr *VerifyRequest) Get() error
func (*VerifyRequest) GetOIDCInfo ¶
func (vr *VerifyRequest) GetOIDCInfo() (*oidc.UserInfo, error)
func (*VerifyRequest) PrepareForSave ¶
func (vr *VerifyRequest) PrepareForSave()
func (*VerifyRequest) Save ¶
func (vr *VerifyRequest) Save() error
func (*VerifyRequest) SetOIDCInfo ¶
func (vr *VerifyRequest) SetOIDCInfo(info *oidc.UserInfo) error
Click to show internal directories.
Click to hide internal directories.