parent
74d2751d88
commit
a1f808c86e
1 changed files with 44 additions and 69 deletions
|
|
@ -36,7 +36,7 @@ func TestNewEnterpriseHandler_Validation(t *testing.T) {
|
|||
AccessToken: "mock_access_token",
|
||||
TokenType: "Bearer",
|
||||
}
|
||||
return token.WithExtra(map[string]interface{}{"id_token": "mock_id_token"}), nil
|
||||
return token.WithExtra(map[string]any{"id_token": "mock_id_token"}), nil
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -194,7 +194,7 @@ func TestNewEnterpriseHandler_Validation(t *testing.T) {
|
|||
AccessToken: "mock_access_token",
|
||||
TokenType: "Bearer",
|
||||
}
|
||||
return token.WithExtra(map[string]interface{}{"id_token": "mock_id_token"}), nil
|
||||
return token.WithExtra(map[string]any{"id_token": "mock_id_token"}), nil
|
||||
},
|
||||
},
|
||||
wantError: "",
|
||||
|
|
@ -254,7 +254,7 @@ func TestEnterpriseHandler_Authorize_E2E(t *testing.T) {
|
|||
AccessToken: "mock_access_token",
|
||||
TokenType: "Bearer",
|
||||
}
|
||||
return token.WithExtra(map[string]interface{}{"id_token": "mock_id_token_from_user_login"}), nil
|
||||
return token.WithExtra(map[string]any{"id_token": "mock_id_token_from_user_login"}), nil
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
@ -305,7 +305,7 @@ func setupIdPServer(t *testing.T) *httptest.Server {
|
|||
// OAuth/OIDC metadata endpoint - uses closure to get server URL
|
||||
mux.HandleFunc("/.well-known/oauth-authorization-server", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(map[string]interface{}{
|
||||
json.NewEncoder(w).Encode(map[string]any{
|
||||
"issuer": server.URL,
|
||||
"token_endpoint": server.URL + "/token",
|
||||
"authorization_endpoint": server.URL + "/authorize",
|
||||
|
|
@ -350,7 +350,7 @@ func setupIdPServer(t *testing.T) *httptest.Server {
|
|||
|
||||
// Return ID-JAG (Identity Assertion JWT Authorization Grant)
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(map[string]interface{}{
|
||||
json.NewEncoder(w).Encode(map[string]any{
|
||||
"access_token": "id-jag-token-from-idp",
|
||||
"issued_token_type": oauthex.TokenTypeIDJAG,
|
||||
"token_type": "N_A",
|
||||
|
|
@ -375,7 +375,7 @@ func setupMCPAuthServer(t *testing.T) *httptest.Server {
|
|||
// OAuth metadata endpoint - uses closure to get server URL
|
||||
mux.HandleFunc("/.well-known/oauth-authorization-server", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(map[string]interface{}{
|
||||
json.NewEncoder(w).Encode(map[string]any{
|
||||
"issuer": server.URL,
|
||||
"token_endpoint": server.URL + "/token",
|
||||
"code_challenge_methods_supported": []string{"S256"},
|
||||
|
|
@ -412,7 +412,7 @@ func setupMCPAuthServer(t *testing.T) *httptest.Server {
|
|||
|
||||
// Return access token
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(map[string]interface{}{
|
||||
json.NewEncoder(w).Encode(map[string]any{
|
||||
"access_token": "mcp_access_token_from_jwt_bearer",
|
||||
"token_type": "Bearer",
|
||||
"expires_in": 3600,
|
||||
|
|
@ -480,7 +480,7 @@ func TestEnterpriseHandler_TokenSource_BeforeAuthorization(t *testing.T) {
|
|||
AccessToken: "mock_access_token",
|
||||
TokenType: "Bearer",
|
||||
}
|
||||
return token.WithExtra(map[string]interface{}{"id_token": "mock_id_token"}), nil
|
||||
return token.WithExtra(map[string]any{"id_token": "mock_id_token"}), nil
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue