Open Kilda Java Documentation
CustomWebAuthenticationDetails.java
Go to the documentation of this file.
1 package org.openkilda.security;
2 
3 import org.springframework.security.web.authentication.WebAuthenticationDetails;
4 
5 import javax.servlet.http.HttpServletRequest;
6 
7 public class CustomWebAuthenticationDetails extends WebAuthenticationDetails {
8 
9  private static final long serialVersionUID = 6662611705477130485L;
10 
11  private String verificationCode;
12  private String configure2Fa;
13 
14  public CustomWebAuthenticationDetails(final HttpServletRequest request) {
15  super(request);
16  verificationCode = request.getParameter("code");
17  configure2Fa = request.getParameter("configure2Fa");
18  }
19 
20  public String getVerificationCode() {
21  return verificationCode;
22  }
23 
24  public boolean isConfigure2Fa() {
25  return configure2Fa != null && configure2Fa.equalsIgnoreCase("TRUE") ? true : false;
26  }
27 }