mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 10:21:40 +00:00
refactor: move gateway and vault components to new locations
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package context
|
||||
|
||||
import (
|
||||
"github.com/go-webauthn/webauthn/protocol"
|
||||
)
|
||||
|
||||
func (c *GatewayContext) NewChallenge() string {
|
||||
chal, _ := protocol.CreateChallenge()
|
||||
chalStr := chal.String()
|
||||
return chalStr
|
||||
}
|
||||
|
||||
func (cc *GatewayContext) ListCredentials(handle string) ([]*CredentialDescriptor, error) {
|
||||
creds, err := cc.GetCredentialsByHandle(bgCtx(), handle)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return CredentialArrayToDescriptors(creds), nil
|
||||
}
|
||||
Reference in New Issue
Block a user