better support for /device/callback redirect uris with public clients.

Signed-off-by: justin-slowik <justin.slowik@thermofisher.com>
This commit is contained in:
justin-slowik
2020-05-13 15:38:43 -04:00
parent f6d8427f32
commit 9882ea453f
6 changed files with 19 additions and 11 deletions

View File

@@ -1317,8 +1317,8 @@ func TestOAuth2DeviceFlow(t *testing.T) {
//Add the Clients to the test server
client := storage.Client{
ID: clientID,
//Secret: "testclientsecret",
RedirectURIs: []string{"/non-root-path/device/callback"},
RedirectURIs: []string{deviceCallbackURI},
Public: true,
}
if err := s.storage.CreateClient(client); err != nil {
t.Fatalf("failed to create client: %v", err)
@@ -1421,7 +1421,7 @@ func TestOAuth2DeviceFlow(t *testing.T) {
ClientSecret: client.Secret,
Endpoint: p.Endpoint(),
Scopes: requestedScopes,
RedirectURL: "/non-root-path/device/callback",
RedirectURL: deviceCallbackURI,
}
if len(tc.scopes) != 0 {
oauth2Config.Scopes = tc.scopes