()
| 1026 | } |
| 1027 | |
| 1028 | func (user *User) WebAuthnCredentials() []webauthn.Credential { |
| 1029 | var credentials []webauthn.Credential |
| 1030 | |
| 1031 | for _, factor := range user.Factors { |
| 1032 | if factor.IsVerified() && factor.FactorType == WebAuthn { |
| 1033 | credential := factor.WebAuthnCredential.Credential |
| 1034 | credentials = append(credentials, credential) |
| 1035 | } |
| 1036 | } |
| 1037 | |
| 1038 | return credentials |
| 1039 | } |
| 1040 | |
| 1041 | func obfuscateValue(id uuid.UUID, value string) string { |
| 1042 | hash := sha256.Sum256([]byte(id.String() + value)) |
nothing calls this directly
no test coverage detected