mirror of
https://github.com/coder/coder.git
synced 2025-07-18 14:17:22 +00:00
chore: add unit test for pass through external auth query params (#12928)
* chore: verify pass through external auth query params Unit test added to verify behavior of query params set in the auth url for external apps. This behavior is intended to specifically support Auth0 audience query param.
This commit is contained in:
@ -54,12 +54,12 @@ func TestFakeIDPBasicFlow(t *testing.T) {
|
||||
token = oauthToken
|
||||
})
|
||||
|
||||
resp, err := fake.OIDCCallback(t, expectedState, jwt.MapClaims{})
|
||||
require.NoError(t, err)
|
||||
//nolint:bodyclose
|
||||
resp := fake.OIDCCallback(t, expectedState, jwt.MapClaims{})
|
||||
require.Equal(t, http.StatusOK, resp.StatusCode)
|
||||
|
||||
// Test the user info
|
||||
_, err = cfg.Provider.UserInfo(ctx, oauth2.StaticTokenSource(token))
|
||||
_, err := cfg.Provider.UserInfo(ctx, oauth2.StaticTokenSource(token))
|
||||
require.NoError(t, err)
|
||||
|
||||
// Now test it can refresh
|
||||
|
Reference in New Issue
Block a user