Add basic key registration
This commit is contained in:
parent
3dfe5b8558
commit
949d1fc2ad
6 changed files with 138 additions and 55 deletions
|
@ -1,23 +1,11 @@
|
|||
package sqlite_directory
|
||||
|
||||
import (
|
||||
"crypto"
|
||||
|
||||
"crispbyte.dev/sig-auth/keydirectory"
|
||||
)
|
||||
|
||||
func CreateDirectory(alg string, publicKey crypto.PublicKey) InMemoryDirectory {
|
||||
keyDir := InMemoryDirectory{
|
||||
func CreateDirectory() InMemoryDirectory {
|
||||
return InMemoryDirectory{
|
||||
records: map[string]keydirectory.KeyEntry{},
|
||||
}
|
||||
|
||||
keyId := "test-id"
|
||||
|
||||
keyDir.records[keyId] = keydirectory.KeyEntry{
|
||||
Alg: alg,
|
||||
PublicKey: publicKey,
|
||||
UserId: "test_user",
|
||||
}
|
||||
|
||||
return keyDir
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue