fixing bugs:
1. error formatting caused error on OIDC login 2. sending credentials to OIDC provider Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -282,7 +282,7 @@ public class UserModule extends BaseHandler implements UserService {
|
||||
var location = state.config.getString(TOKEN_ENDPOINT);
|
||||
|
||||
try {
|
||||
var data = Map.of(GRANT_TYPE,AUTHORIZATION_CODE, CODE,code,REDIRECT_URI,redirect);
|
||||
var data = Map.of(GRANT_TYPE,AUTHORIZATION_CODE, CODE,code,REDIRECT_URI,redirect,CLIENT_ID,state.loginService.clientId(),CLIENT_SECRET,state.loginService.clientSecret());
|
||||
var resp = request(location,data,MIME_FORM_URL,state.loginService.basicAuth());
|
||||
if (!(resp instanceof JSONObject json)) return sendContent(ex,HTTP_BAD_REQUEST,format("{0} did not return JSON!",location));
|
||||
if (!json.has(ID_TOKEN)) return sendContent(ex,HTTP_FAILED_DEPENDENCY,"Missing ID token – token exchange failed!");
|
||||
|
||||
Reference in New Issue
Block a user