refactor: move gateway and vault components to new locations

This commit is contained in:
Prad Nukala
2024-12-28 18:08:59 -05:00
parent b0a91ddf14
commit 356093d08a
59 changed files with 60 additions and 60 deletions
+19
View File
@@ -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
}