Documentation ¶
Index ¶
- func FinalizeLoginEndpoint(svc Service) endpoint.Endpoint
- func FinalizeLoginHandler(endpoint endpoint.Endpoint) gin.HandlerFunc
- func FinalizeRegistrationEndpoint(svc Service) endpoint.Endpoint
- func FinalizeRegistrationHandler(endpoint endpoint.Endpoint) gin.HandlerFunc
- func FinalizeTransactionEndpoint(svc Service) endpoint.Endpoint
- func FinalizeTransactionHandler(endpoint endpoint.Endpoint) gin.HandlerFunc
- func InitializeLoginEndpoint(svc Service) endpoint.Endpoint
- func InitializeLoginHandler(endpoint endpoint.Endpoint) gin.HandlerFunc
- func InitializeRegistrationEndpoint(svc Service) endpoint.Endpoint
- func InitializeRegistrationHandler(endpoint endpoint.Endpoint) gin.HandlerFunc
- func InitializeTransactionEndpoint(svc Service) endpoint.Endpoint
- func InitializeTransactionHandler(endpoint endpoint.Endpoint) gin.HandlerFunc
- type Credential
- type CredentialServie
- type FailureResult
- type InitializeLoginRequest
- type InitializeLoginResponse
- type InitializeRegistrationRequest
- type InitializeTransactionRequest
- type InitializeTransactionResponse
- type LoginService
- type PasskeyService
- type RegistrationService
- type Service
- type TokenResult
- type TransactionService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FinalizeLoginEndpoint ¶
func FinalizeLoginHandler ¶
func FinalizeLoginHandler(endpoint endpoint.Endpoint) gin.HandlerFunc
func FinalizeRegistrationHandler ¶
func FinalizeRegistrationHandler(endpoint endpoint.Endpoint) gin.HandlerFunc
func FinalizeTransactionEndpoint ¶ added in v1.0.1
func FinalizeTransactionHandler ¶ added in v1.0.1
func FinalizeTransactionHandler(endpoint endpoint.Endpoint) gin.HandlerFunc
func InitializeLoginEndpoint ¶
func InitializeLoginHandler ¶
func InitializeLoginHandler(endpoint endpoint.Endpoint) gin.HandlerFunc
func InitializeRegistrationHandler ¶
func InitializeRegistrationHandler(endpoint endpoint.Endpoint) gin.HandlerFunc
func InitializeTransactionEndpoint ¶ added in v1.0.1
func InitializeTransactionHandler ¶ added in v1.0.1
func InitializeTransactionHandler(endpoint endpoint.Endpoint) gin.HandlerFunc
Types ¶
type Credential ¶
type Credential struct { ID string `json:"id"` Name *string `json:"name,omitempty"` PublicKey string `json:"public_key"` AttestationType string `json:"attestation_type"` AAGUID uuid.UUID `json:"aaguid"` LastUsedAt *time.Time `json:"last_used_at,omitempty"` CreatedAt time.Time `json:"created_at"` Transports []string `json:"transports"` BackupEligible bool `json:"backup_eligible"` BackupState bool `json:"backup_state"` IsMFA bool `json:"is_mfa"` }
type CredentialServie ¶
type FailureResult ¶
type FailureResult struct { Title string `json:"title"` Details string `json:"details"` Status int `json:"status"` }
func (*FailureResult) Error ¶
func (result *FailureResult) Error() string
type InitializeLoginRequest ¶
type InitializeLoginRequest struct {
UserID string `json:"user_id"`
}
type InitializeLoginResponse ¶
type InitializeLoginResponse struct { Response protocol.PublicKeyCredentialRequestOptions `json:"publicKey"` Mediation string `json:"mediation"` }
type InitializeTransactionResponse ¶ added in v1.0.1
type InitializeTransactionResponse struct { Response protocol.PublicKeyCredentialRequestOptions `json:"publicKey"` Mediation string `json:"mediation"` }
type LoginService ¶
type PasskeyService ¶
type PasskeyService interface { RegistrationService LoginService // CredentialServie TransactionService }
type RegistrationService ¶
type RegistrationService interface { InitializeRegistration(userID string, username string) (*protocol.CredentialCreation, error) FinalizeRegistration(req *protocol.ParsedCredentialCreationData) (string, error) }
type Service ¶
type Service interface { PasskeyService }
func NewService ¶
func NewService(cfg conf.PasskeysProvider) (Service, error)
type TokenResult ¶
type TokenResult struct {
Token string `json:"token"`
}
type TransactionService ¶
type TransactionService interface { InitializeTransaction(req *InitializeTransactionRequest) (*protocol.CredentialAssertion, string, error) FinalizeTransaction(req *protocol.ParsedCredentialAssertionData) (string, error) }
Click to show internal directories.
Click to hide internal directories.