Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/server/auth/was/Response.java @ 8203:238fc722f87a
sed 's/logger/log/g' src/**/*.java
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 05 Sep 2014 13:19:22 +0200 |
parents | 7bc35bbd8b27 |
children | a3bc62722239 |
comparison
equal
deleted
inserted
replaced
8202:e4606eae8ea5 | 8203:238fc722f87a |
---|---|
34 import org.dive4elements.river.client.server.features.Features; | 34 import org.dive4elements.river.client.server.features.Features; |
35 | 35 |
36 | 36 |
37 public class Response implements Authentication { | 37 public class Response implements Authentication { |
38 | 38 |
39 private static Logger logger = Logger.getLogger(Response.class); | 39 private static Logger log = Logger.getLogger(Response.class); |
40 | 40 |
41 private Element root; | 41 private Element root; |
42 private String samlTicketXML; | 42 private String samlTicketXML; |
43 private Assertion assertion; | 43 private Assertion assertion; |
44 private String username; | 44 private String username; |
100 TicketValidator validator = | 100 TicketValidator validator = |
101 new TicketValidator(this.trustedKeyFile); | 101 new TicketValidator(this.trustedKeyFile); |
102 this.assertion = validator.checkTicket(this.root); | 102 this.assertion = validator.checkTicket(this.root); |
103 } | 103 } |
104 catch (Exception e) { | 104 catch (Exception e) { |
105 logger.error(e.getLocalizedMessage(), e); | 105 log.error(e.getLocalizedMessage(), e); |
106 } | 106 } |
107 } | 107 } |
108 return this.assertion; | 108 return this.assertion; |
109 } | 109 } |
110 | 110 |
114 if (assertion == null) { | 114 if (assertion == null) { |
115 throw new AuthenticationException("Response doesn't contain an assertion"); | 115 throw new AuthenticationException("Response doesn't contain an assertion"); |
116 } | 116 } |
117 List<String> features = this.features.getFeatures( | 117 List<String> features = this.features.getFeatures( |
118 this.assertion.getRoles()); | 118 this.assertion.getRoles()); |
119 logger.debug("User " + this.username + " with features " + features + | 119 log.debug("User " + this.username + " with features " + features + |
120 " successfully authenticated."); | 120 " successfully authenticated."); |
121 return new User(assertion, this.samlTicketXML, features, this.password); | 121 return new User(assertion, this.samlTicketXML, features, this.password); |
122 } | 122 } |
123 } | 123 } |
124 // vim: set si et fileencoding=utf-8 ts=4 sw=4 tw=80: | 124 // vim: set si et fileencoding=utf-8 ts=4 sw=4 tw=80: |