2015-08-18 05:57:27 +05:30
|
|
|
package repo
|
|
|
|
|
|
|
|
import (
|
2016-02-10 04:36:07 +05:30
|
|
|
"encoding/base64"
|
2015-08-18 05:57:27 +05:30
|
|
|
"net/url"
|
|
|
|
|
|
|
|
"github.com/coreos/go-oidc/oidc"
|
|
|
|
|
|
|
|
"github.com/coreos/dex/client"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2016-04-15 04:27:53 +05:30
|
|
|
testClients = []client.Client{
|
|
|
|
client.Client{
|
2015-08-18 05:57:27 +05:30
|
|
|
Credentials: oidc.ClientCredentials{
|
|
|
|
ID: "client1",
|
2016-02-10 04:36:07 +05:30
|
|
|
Secret: base64.URLEncoding.EncodeToString([]byte("secret-1")),
|
2015-08-18 05:57:27 +05:30
|
|
|
},
|
|
|
|
Metadata: oidc.ClientMetadata{
|
2016-01-13 06:46:28 +05:30
|
|
|
RedirectURIs: []url.URL{
|
2015-08-18 05:57:27 +05:30
|
|
|
url.URL{
|
|
|
|
Scheme: "https",
|
2016-04-06 23:55:50 +05:30
|
|
|
Host: "client1.example.com",
|
|
|
|
Path: "/callback",
|
2015-08-18 05:57:27 +05:30
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2016-04-15 04:27:53 +05:30
|
|
|
client.Client{
|
2015-08-18 05:57:27 +05:30
|
|
|
Credentials: oidc.ClientCredentials{
|
|
|
|
ID: "client2",
|
2016-02-10 04:36:07 +05:30
|
|
|
Secret: base64.URLEncoding.EncodeToString([]byte("secret-2")),
|
2015-08-18 05:57:27 +05:30
|
|
|
},
|
|
|
|
Metadata: oidc.ClientMetadata{
|
2016-01-13 06:46:28 +05:30
|
|
|
RedirectURIs: []url.URL{
|
2015-08-18 05:57:27 +05:30
|
|
|
url.URL{
|
|
|
|
Scheme: "https",
|
2016-04-06 23:55:50 +05:30
|
|
|
Host: "client2.example.com",
|
|
|
|
Path: "/callback",
|
2015-08-18 05:57:27 +05:30
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
)
|