Skip to content

Commit

Permalink
Retreive username from server in autologin flow
Browse files Browse the repository at this point in the history
  • Loading branch information
sumedhe committed Feb 14, 2021
1 parent db793a1 commit c154a28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<%@ page import="org.wso2.carbon.identity.recovery.util.Utils" %>
<%@ page import="org.apache.http.client.utils.URIBuilder" %>
<%@ page import="java.net.URI" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.model.User" %>

<jsp:directive.include file="includes/localize.jsp"/>
<jsp:directive.include file="tenant-resolve.jsp"/>
Expand All @@ -56,7 +57,7 @@
String newPassword = request.getParameter("reset-password");
String callback = request.getParameter("callback");
String userStoreDomain = request.getParameter("userstoredomain");
String username = request.getParameter("username");
String username = null;
boolean isAutoLoginEnable = Boolean.parseBoolean(Utils.getConnectorConfig("Recovery.AutoLogin.Enable",
tenantDomain));
Expand Down Expand Up @@ -87,7 +88,9 @@
resetPasswordRequest.setProperties(properties);
try {
notificationApi.setPasswordPost(resetPasswordRequest);
User user = notificationApi.setUserPasswordPost(resetPasswordRequest);
username = user.getUsername();
userStoreDomain = user.getRealm();
if (isAutoLoginEnable) {
if (userStoreDomain != null) {
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -641,11 +641,11 @@
<carbon.extension.identity.authenticator.version>3.0.0</carbon.extension.identity.authenticator.version>
<org.wso2.carbon.identity.association.account>5.1.5</org.wso2.carbon.identity.association.account>
<identity.extension.utils>1.0.8</identity.extension.utils>
<carbon.identity.framework.version>5.19.21</carbon.identity.framework.version>
<carbon.identity.framework.version>5.19.30</carbon.identity.framework.version>
<carbon.identity.framework.imp.pkg.version.range>[5.0.0, 6.0.0)</carbon.identity.framework.imp.pkg.version.range>
<carbon.identity.oauth.version>6.4.98</carbon.identity.oauth.version>
<carbon.identity.oauth.imp.pkg.version.range>[6.1.0, 7.0.0)</carbon.identity.oauth.imp.pkg.version.range>
<identity.governance.version>1.4.16</identity.governance.version>
<identity.governance.version>1.4.90</identity.governance.version>
<totp.authenticator.version>3.0.1</totp.authenticator.version>

<commons-io.wso2.version>2.4.0.wso2v1</commons-io.wso2.version>
Expand Down

0 comments on commit c154a28

Please sign in to comment.