Documentation ¶
Index ¶
- Constants
- func NewWebAuthnConnectionInput() *node.Node
- func NewWebAuthnConnectionName() *node.Node
- func NewWebAuthnConnectionTrigger(options string) *node.Node
- func NewWebAuthnLoginInput() *node.Node
- func NewWebAuthnLoginTrigger(options string) *node.Node
- func NewWebAuthnScript(src string, contents []byte) *node.Node
- func NewWebAuthnUnlink(c *Credential) *node.Node
- type Authenticator
- type Credential
- type Credentials
- type CredentialsConfig
- type Strategy
- func (s *Strategy) CountActiveCredentials(cc map[identity.CredentialsType]identity.Credentials) (count int, err error)
- func (s *Strategy) ID() identity.CredentialsType
- func (s *Strategy) Login(w http.ResponseWriter, r *http.Request, f *login.Flow, ss *session.Session) (i *identity.Identity, err error)
- func (s *Strategy) NodeGroup() node.Group
- func (s *Strategy) PopulateLoginMethod(r *http.Request, requestedAAL identity.AuthenticatorAssuranceLevel, ...) error
- func (s *Strategy) PopulateSettingsMethod(r *http.Request, id *identity.Identity, f *settings.Flow) error
- func (s *Strategy) RegisterLoginRoutes(r *x.RouterPublic)
- func (s *Strategy) RegisterSettingsRoutes(_ *x.RouterPublic)
- func (s *Strategy) Settings(w http.ResponseWriter, r *http.Request, f *settings.Flow, ss *session.Session) (*settings.UpdateContext, error)
- func (s *Strategy) SettingsStrategyID() string
Constants ¶
View Source
const (
InternalContextKeySessionData = "session_data"
)
Variables ¶
This section is empty.
Functions ¶
func NewWebAuthnLoginInput ¶
func NewWebAuthnLoginTrigger ¶
func NewWebAuthnUnlink ¶
func NewWebAuthnUnlink(c *Credential) *node.Node
Types ¶
type Authenticator ¶
type Credential ¶
type Credential struct { ID []byte `json:"id"` PublicKey []byte `json:"public_key"` AttestationType string `json:"attestation_type"` Authenticator Authenticator `json:"authenticator"` DisplayName string `json:"display_name"` AddedAt time.Time `json:"added_at"` }
func CredentialFromWebAuthn ¶
func CredentialFromWebAuthn(credential *webauthn.Credential) *Credential
func (*Credential) ToWebAuthn ¶
func (c *Credential) ToWebAuthn() *webauthn.Credential
type Credentials ¶
type Credentials []Credential
func (Credentials) ToWebAuthn ¶
func (c Credentials) ToWebAuthn() []webauthn.Credential
type CredentialsConfig ¶
type CredentialsConfig struct { // List of webauthn credentials. Credentials Credentials `json:"credentials"` }
CredentialsConfig is the struct that is being used as part of the identity credentials.
type Strategy ¶
type Strategy struct {
// contains filtered or unexported fields
}
func NewStrategy ¶
func NewStrategy(d registrationStrategyDependencies) *Strategy
func (*Strategy) CountActiveCredentials ¶
func (s *Strategy) CountActiveCredentials(cc map[identity.CredentialsType]identity.Credentials) (count int, err error)
func (*Strategy) ID ¶
func (s *Strategy) ID() identity.CredentialsType
func (*Strategy) PopulateLoginMethod ¶
func (*Strategy) PopulateSettingsMethod ¶
func (*Strategy) RegisterLoginRoutes ¶
func (s *Strategy) RegisterLoginRoutes(r *x.RouterPublic)
swagger:route GET /.well-known/ory/webauthn.js v0alpha2 getWebAuthnJavaScript
Get WebAuthn JavaScript ¶
This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration.
If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file:
```html <script src="https://public-kratos.example.org/.well-known/ory/webauthn.js" type="script" async /> ```
More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
Produces: - text/javascript Schemes: http, https Responses: 200: webAuthnJavaScript
func (*Strategy) RegisterSettingsRoutes ¶
func (s *Strategy) RegisterSettingsRoutes(_ *x.RouterPublic)
func (*Strategy) SettingsStrategyID ¶
Click to show internal directories.
Click to hide internal directories.