You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2020/05/21 11:19:57 UTC
[cxf-fediz] branch master updated: A proposed fix for FEDIZ-243
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf-fediz.git
The following commit(s) were added to refs/heads/master by this push:
new 1fe1705 A proposed fix for FEDIZ-243
new 06d8be0 Merge pull request #49 from amergey/master
1fe1705 is described below
commit 1fe1705dd0a8a37b68e45ef72dde48fe54bf2cd2
Author: <a_...@yahoo.fr>
AuthorDate: Wed Feb 12 16:16:44 2020 +0100
A proposed fix for FEDIZ-243
Get rid of Constants.FORM_PRINCIPAL_NOTE that is not used anymore in
form authenticator
---
.../java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java | 5 -----
.../org/apache/cxf/fediz/tomcat/handler/TomcatSigninHandler.java | 4 ++--
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java b/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
index d5090ca..213613f 100644
--- a/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
+++ b/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
@@ -267,11 +267,6 @@ public class FederationAuthenticator extends FormAuthenticator {
Session session = request.getSessionInternal();
LOG.debug("Restore request from session '{}'", session.getIdInternal());
- // Get principal from session, register, and then remove it
- Principal principal = (Principal)session.getNote(Constants.FORM_PRINCIPAL_NOTE);
- register(request, response, principal, FederationConstants.WSFED_METHOD, null, null);
- request.removeNote(Constants.FORM_PRINCIPAL_NOTE);
-
if (restoreRequest(request)) {
LOG.debug("Proceed to restored request");
return true;
diff --git a/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/handler/TomcatSigninHandler.java b/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/handler/TomcatSigninHandler.java
index 52f7231..77a30b5 100644
--- a/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/handler/TomcatSigninHandler.java
+++ b/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/handler/TomcatSigninHandler.java
@@ -66,8 +66,8 @@ public class TomcatSigninHandler extends SigninHandler<FedizPrincipal> {
Session session = ((Request)request).getSessionInternal();
- // Save the authenticated Principal in our session
- session.setNote(Constants.FORM_PRINCIPAL_NOTE, principal);
+ // Register the authenticated Principal
+ register((Request) request, response, principal, FederationConstants.WSFED_METHOD, null, null);
// Save Federation response in our session
session.setNote(FederationAuthenticator.FEDERATION_NOTE, wfRes);