Revision 52117
Added by Sofia Baltzi almost 6 years ago
modules/dnet-openaire-users/trunk/src/main/java/eu/dnetlib/openaire/usermanagement/utils/UrlConstructor.java | ||
---|---|---|
35 | 35 |
if (jspPage.equals("successAddPassword.jsp")) { |
36 | 36 |
request.getSession().setAttribute("successAddPassword", "true"); |
37 | 37 |
} |
38 |
if (jspPage.equals("successDeleteAccount.jsp")) { |
|
39 |
request.getSession().setAttribute("successDeleteAccount", "true"); |
|
40 |
} |
|
38 | 41 |
if (jspPage.equals("expiredVerificationCode.jsp")) { |
39 | 42 |
request.getSession().setAttribute("expiredVerificationCode", "true"); |
40 | 43 |
} |
modules/dnet-openaire-users/trunk/src/main/java/eu/dnetlib/openaire/usermanagement/security/FrontEndLinkURIAuthenticationSuccessHandler.java | ||
---|---|---|
30 | 30 |
try { |
31 | 31 |
|
32 | 32 |
Cookie jwt = new Cookie("XCsrfToken", JWTGenerator.generateToken(authOIDC, "my-very-secret")); |
33 |
// Cookie openAIREUser = new Cookie("openAIREUser", new Gson().toJson(JWTGenerator.generateJsonToken(authOIDC)));
|
|
33 |
// Cookie openAIREUser = new Cookie("openAIREUser", new Gson().toJson(JWTGenerator.generateJsonToken(authOIDC)));
|
|
34 | 34 |
Cookie accessToken = new Cookie("AccessToken", authOIDC.getAccessTokenValue()); |
35 | 35 |
|
36 | 36 |
// Expire the cookies in four hours (4 * 3600) |
37 | 37 |
jwt.setMaxAge(14400); |
38 |
// openAIREUser.setMaxAge(14400);
|
|
38 |
// openAIREUser.setMaxAge(14400);
|
|
39 | 39 |
accessToken.setMaxAge(14400); |
40 | 40 |
|
41 | 41 |
//TODO DELETE LOG |
42 | 42 |
logger.info("\n////////////////////////////////////////////////////////////////////////////////////////////////\n"); |
43 | 43 |
logger.info("jwt: " + JWTGenerator.generateToken(authOIDC, "my-very-secret")); |
44 | 44 |
logger.info("access token: " + authOIDC.getAccessTokenValue()); |
45 |
// logger.info("openAIREUser: " + JWTGenerator.generateJsonToken(authOIDC));
|
|
45 |
logger.info("openAIREUser: " + JWTGenerator.generateJsonToken(authOIDC)); |
|
46 | 46 |
logger.info("\n////////////////////////////////////////////////////////////////////////////////////////////////\n"); |
47 | 47 |
|
48 | 48 |
//TODO DELETE LOG |
... | ... | |
52 | 52 |
|
53 | 53 |
|
54 | 54 |
jwt.setPath(frontPath); |
55 |
if (frontDomain!=null) jwt.setDomain(frontDomain); |
|
56 |
// openAIREUser.setPath(frontPath); |
|
57 |
// if (frontDomain!=null) openAIREUser.setDomain(frontDomain); |
|
55 |
// openAIREUser.setPath(frontPath); |
|
58 | 56 |
accessToken.setPath(frontPath); |
59 |
if (frontDomain!=null) accessToken.setDomain(frontDomain); |
|
60 | 57 |
|
58 |
if (frontDomain!=null) { |
|
59 |
jwt.setDomain(frontDomain); |
|
60 |
// openAIREUser.setDomain(frontDomain); |
|
61 |
accessToken.setDomain(frontDomain); |
|
62 |
} |
|
63 |
|
|
61 | 64 |
response.addCookie(jwt); |
62 |
// response.addCookie(openAIREUser);
|
|
65 |
// response.addCookie(openAIREUser);
|
|
63 | 66 |
response.addCookie(accessToken); |
64 | 67 |
response.sendRedirect(frontEndURI); |
65 | 68 |
|
modules/dnet-openaire-users/trunk/src/main/java/eu/dnetlib/openaire/usermanagement/security/JWTGenerator.java | ||
---|---|---|
61 | 61 |
} else { |
62 | 62 |
claims.put("lastname", URLEncoder.encode(authOIDC.getUserInfo().getFamilyName(), "UTF-8") + ""); |
63 | 63 |
} |
64 |
claims.put("email", authOIDC.getUserInfo().getEmail() + ""); |
|
65 |
// claims.put("role", URLEncoder.encode(userInfo.getAsJsonArray("edu_person_entitlements").toString(), "UTF-8") + "");
|
|
64 |
// claims.put("email", authOIDC.getUserInfo().getEmail() + "");
|
|
65 |
claims.put("role", URLEncoder.encode(userInfo.getAsJsonArray("edu_person_entitlements").toString(), "UTF-8") + ""); |
|
66 | 66 |
// |
67 | 67 |
|
68 | 68 |
// if (userInfo.getAsJsonArray("eduPersonScopedAffiliation").toString() != null) { |
... | ... | |
72 | 72 |
if (userInfo.getAsJsonArray("edu_person_entitlements") == null){ |
73 | 73 |
logger.info("User: " + authOIDC.getUserInfo().getName() + "doesn't have role"); |
74 | 74 |
claims.put("role", URLEncoder.encode(" ", "UTF-8") + ""); |
75 |
//s claims.put("role", "");
|
|
75 |
// claims.put("role", ""); |
|
76 | 76 |
} else { |
77 | 77 |
claims.put("role", URLEncoder.encode(userInfo.getAsJsonArray("edu_person_entitlements").toString(), "UTF-8") + ""); |
78 | 78 |
} |
modules/dnet-openaire-users/trunk/src/main/webapp/WEB-INF/web.xml | ||
---|---|---|
118 | 118 |
<url-pattern>/requestActivationCode</url-pattern> |
119 | 119 |
</servlet-mapping> |
120 | 120 |
|
121 |
<servlet> |
|
122 |
<servlet-name>RequestToDeleteAccountServlet</servlet-name> |
|
123 |
<display-name>Request to delete an account</display-name> |
|
124 |
<servlet-class>eu.dnetlib.openaire.usermanagement.RequestToDeleteAccountServlet</servlet-class> |
|
125 |
<load-on-startup>1</load-on-startup> |
|
126 |
</servlet> |
|
121 | 127 |
|
128 |
<servlet-mapping> |
|
129 |
<servlet-name>RequestToDeleteAccountServlet</servlet-name> |
|
130 |
<url-pattern>/requestToDeleteAccount</url-pattern> |
|
131 |
</servlet-mapping> |
|
132 |
|
|
133 |
<servlet> |
|
134 |
<servlet-name>VerifyToDeletServlet</servlet-name> |
|
135 |
<display-name>Verify to delete an account</display-name> |
|
136 |
<servlet-class>eu.dnetlib.openaire.usermanagement.VerifyToDeleteServlet</servlet-class> |
|
137 |
<load-on-startup>1</load-on-startup> |
|
138 |
</servlet> |
|
139 |
|
|
140 |
<servlet-mapping> |
|
141 |
<servlet-name>VerifyToDeletServlet</servlet-name> |
|
142 |
<url-pattern>/verifyToDelete</url-pattern> |
|
143 |
</servlet-mapping> |
|
144 |
|
|
145 |
|
|
122 | 146 |
<filter> |
123 | 147 |
<filter-name>CorsFilter</filter-name> |
124 | 148 |
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class> |
modules/dnet-openaire-users/trunk/src/main/webapp/css/aai-custom.css | ||
---|---|---|
7 | 7 |
text-transform: initial !important; |
8 | 8 |
font-variant: small-caps; |
9 | 9 |
} |
10 |
|
|
11 |
.custom-footer { |
|
12 |
position: relative; |
|
13 |
bottom: 0; |
|
14 |
left: 0; |
|
15 |
right: 0; |
|
16 |
} |
|
17 |
|
|
18 |
|
|
19 |
#tm-main { |
|
20 |
min-height: 80vh; |
|
21 |
} |
modules/dnet-openaire-users/trunk/src/main/webapp/requestActivationCode.jsp | ||
---|---|---|
44 | 44 |
</div> |
45 | 45 |
<div class=" uk-section uk-margin-small-top tm-middle custom-main-content" id="tm-main"> |
46 | 46 |
<div class="uk-container uk-container-small uk-margin-medium-top uk-margin-small-bottom uk-text-center"> |
47 |
<h2 class="uk-h2 uk-margin-small-bottom">Request an Activation Code</h2>
|
|
47 |
<h2 class="uk-h2 uk-margin-small-bottom">Request an activation code</h2>
|
|
48 | 48 |
<div uk-grid="" class="uk-grid uk-grid-stack"> |
49 | 49 |
<div class="tm-main uk-width-1-2@s uk-width-1-1@m uk-width-1-1@l uk-row-first uk-first-column uk-align-center"> |
50 | 50 |
<div class="uk-grid "> |
modules/dnet-openaire-users/trunk/src/main/webapp/error404.jsp | ||
---|---|---|
29 | 29 |
</div> |
30 | 30 |
<!-- CONTENT STARTS HERE --> |
31 | 31 |
<div class="first_page_section uk-section-default uk-section uk-padding-remove-vertical"> |
32 |
<div class="first_page_banner_headline uk-grid-collapse uk-flex-middle uk-margin-remove-vertical uk-grid"> |
|
32 |
<div class="first_page_banner_headline uk-grid-collapse uk-flex-middle uk-margin-remove-vertical uk-grid" uk-grid="">
|
|
33 | 33 |
</div> |
34 | 34 |
</div> |
35 |
<div class=" uk-section uk-margin-small-top tm-middle custom-main-content" id="tm-main"> |
|
35 |
<div class=" uk-section uk-margin-small-top tm-middle custom-main-content" id="tm-main">
|
|
36 | 36 |
<div class="uk-container uk-container-small uk-margin-medium-top uk-margin-small-bottom uk-text-center"> |
37 | 37 |
<%--<h2 class="uk-h2 uk-margin-small-bottom">Welcome to our Single Sign-On service</h2>--%> |
38 | 38 |
<%--<div class="uk-text-meta uk-margin-large-bottom">Use the same credentials for all our services</div>--%> |
39 | 39 |
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first uk-first-column"> |
40 | 40 |
<div class="uk-width-1-1"> |
41 |
<h3 class="uk-h3 uk-text-danger">404 - Oops! Something went wrong!</h3> |
|
41 |
<h3 class="uk-h3 uk-text-danger ">404 - Oops! Something went wrong!</h3>
|
|
42 | 42 |
<div class="middle-box loginscreen animated fadeInDown uk-text-left "> |
43 |
<p>404 Error! The requested page is not found.</p>
|
|
43 |
<p class="uk-text-center">404 Error! The requested page was not found.</p>
|
|
44 | 44 |
</div> |
45 | 45 |
</div> |
46 | 46 |
|
Also available in: Unified diff
Add RequestToDelete page and Fix css