Add jwt bearer grant type for sso service providers

4.x.x
Vigneshan Seshamany 4 years ago
parent e23c2ea29c
commit 929a94dc73

@ -228,8 +228,14 @@ public class SsoLoginHandler extends HttpServlet {
*/
private StringEntity constructAppGrantTypeUpdatePayload() {
JSONObject jsonObject = new JSONObject();
jsonObject.put("supportedGrantTypes", new JSONArray(new Object[]{HandlerConstants.CODE_GRANT_TYPE,
HandlerConstants.REFRESH_TOKEN_GRANT_TYPE, HandlerConstants.PASSWORD_GRANT_TYPE}));
jsonObject.put("supportedGrantTypes",
new JSONArray(new Object[]{
HandlerConstants.CODE_GRANT_TYPE,
HandlerConstants.REFRESH_TOKEN_GRANT_TYPE,
HandlerConstants.PASSWORD_GRANT_TYPE,
HandlerConstants.JWT_BEARER_GRANT_TYPE
})
);
jsonObject.put(HandlerConstants.CALLBACK_URL_KEY, iotsCoreUrl + baseContextPath + HandlerConstants.SSO_LOGIN_CALLBACK);
String payload = jsonObject.toString();
return new StringEntity(payload, ContentType.APPLICATION_JSON);

@ -52,6 +52,7 @@ public class HandlerConstants {
public static final String CODE_GRANT_TYPE = "authorization_code";
public static final String REFRESH_TOKEN_GRANT_TYPE = "refresh_token";
public static final String PASSWORD_GRANT_TYPE = "password";
public static final String JWT_BEARER_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:jwt-bearer";
public static final String SCHEME_SEPARATOR = "://";
public static final String COLON = ":";

Loading…
Cancel
Save