AuthenticationFormServlet.java
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* javax.servlet.Servlet
* javax.servlet.http.HttpServletRequest
* org.apache.felix.scr.annotations.Component
* org.apache.felix.scr.annotations.Property
* org.apache.felix.scr.annotations.Service
* org.apache.sling.auth.core.spi.AbstractAuthenticationFormServlet
*/
package com.day.cq.auth.impl;
import javax.servlet.Servlet;
import javax.servlet.http.HttpServletRequest;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Service;
import org.apache.sling.auth.core.spi.AbstractAuthenticationFormServlet;
@Component
@Property(name="service.description", value={"Default Login Form for CQ Login Selector Authentication Handler"})
@Service(value={Servlet.class})
public class AuthenticationFormServlet
extends AbstractAuthenticationFormServlet {
@Property(name="sling.servlet.paths")
static final String SERVLET_PATH = "/system/sling/cqform/defaultlogin";
@Property(name="sling.auth.requirements")
private static final String AUTH_REQUIREMENT = "-/system/sling/cqform/defaultlogin";
protected String getReason(HttpServletRequest request) {
Object resObj = request.getAttribute("j_reason");
if (resObj != null) {
return resObj.toString();
}
String reason = request.getParameter("j_reason");
if (reason != null) {
return reason;
}
return "";
}
}