Skip to content

Commit

Permalink
fix(examples): Offer Storage with non-global client (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkroepke authored Nov 20, 2023
1 parent 7b64687 commit 7d0cdec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions example/server/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ func (s *publicKey) Key() any {
}

func NewStorage(userStore UserStore) *Storage {
return NewStorageWithClients(userStore, clients)
}

func NewStorageWithClients(userStore UserStore, clients map[string]*Client) *Storage {
key, _ := rsa.GenerateKey(rand.Reader, 2048)
return &Storage{
authRequests: make(map[string]*AuthRequest),
Expand Down

0 comments on commit 7d0cdec

Please sign in to comment.