-
Notifications
You must be signed in to change notification settings - Fork 0
/
fosite_store.go
34 lines (31 loc) · 1 KB
/
fosite_store.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package internal
import (
"context"
"github.com/ory/hydra/client"
"github.com/ory/hydra/driver"
)
func AddFositeExamples(r driver.Registry) {
for _, c := range []client.Client{
{
OutfacingID: "my-client",
Secret: "foobar",
RedirectURIs: []string{"http://localhost:3846/callback"},
ResponseTypes: []string{"id_token", "code", "token"},
GrantTypes: []string{"implicit", "refresh_token", "authorization_code", "password", "client_credentials"},
Scope: "fosite,openid,photos,offline",
},
{
OutfacingID: "encoded:client",
Secret: "encoded&password",
RedirectURIs: []string{"http://localhost:3846/callback"},
ResponseTypes: []string{"id_token", "code", "token"},
GrantTypes: []string{"implicit", "refresh_token", "authorization_code", "password", "client_credentials"},
Scope: "fosite,openid,photos,offline",
},
} {
// #nosec G601
if err := r.ClientManager().CreateClient(context.Background(), &c); err != nil {
panic(err)
}
}
}