dex/functional/repo/client_repo_test.go

46 lines
853 B
Go
Raw Normal View History

2015-08-18 05:57:27 +05:30
package repo
import (
"encoding/base64"
2015-08-18 05:57:27 +05:30
"net/url"
"github.com/coreos/go-oidc/oidc"
"github.com/coreos/dex/client"
)
var (
testClients = []client.Client{
client.Client{
2015-08-18 05:57:27 +05:30
Credentials: oidc.ClientCredentials{
ID: "client1",
Secret: base64.URLEncoding.EncodeToString([]byte("secret-1")),
2015-08-18 05:57:27 +05:30
},
Metadata: oidc.ClientMetadata{
RedirectURIs: []url.URL{
2015-08-18 05:57:27 +05:30
url.URL{
Scheme: "https",
Host: "client1.example.com",
Path: "/callback",
2015-08-18 05:57:27 +05:30
},
},
},
},
client.Client{
2015-08-18 05:57:27 +05:30
Credentials: oidc.ClientCredentials{
ID: "client2",
Secret: base64.URLEncoding.EncodeToString([]byte("secret-2")),
2015-08-18 05:57:27 +05:30
},
Metadata: oidc.ClientMetadata{
RedirectURIs: []url.URL{
2015-08-18 05:57:27 +05:30
url.URL{
Scheme: "https",
Host: "client2.example.com",
Path: "/callback",
2015-08-18 05:57:27 +05:30
},
},
},
},
}
)