You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@git.apache.org on 2017/07/14 21:00:12 UTC

[GitHub] GabrielBrascher commented on a change in pull request #2185: CLOUDSTACK-9976: Redirect saml2 failed login message to a configurable URL

GabrielBrascher commented on a change in pull request #2185: CLOUDSTACK-9976: Redirect saml2 failed login message to a configurable URL
URL: https://github.com/apache/cloudstack/pull/2185#discussion_r127547696
 
 

 ##########
 File path: plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmd.java
 ##########
 @@ -303,9 +308,13 @@ public String authenticate(final String command, final Map<String, Object[]> par
                 }
 
                 if (userAccount == null || userAccount.getExternalEntity() == null || !_samlAuthManager.isUserAuthorized(userAccount.getId(), issuer.getValue())) {
-                    throw new ServerApiException(ApiErrorCode.ACCOUNT_ERROR, _apiServer.getSerializedApiError(ApiErrorCode.ACCOUNT_ERROR.getHttpCode(),
-                            "Your authenticated user is not authorized for SAML Single Sign-On, please contact your administrator",
-                            params, responseType));
+                    String saml2FailedLoginRedirectUrl = configDao.getValue(Config.Saml2FailedLoginRedirectUrl.toString());
+                    if (StringUtils.isEmpty(saml2FailedLoginRedirectUrl)) {
 
 Review comment:
   Thanks for the hint @rafaelweingartner . I will change it.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services