AuthHttpContext.java
1.29 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
44
45
46
47
48
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* org.apache.sling.auth.core.AuthenticationSupport
* org.osgi.service.http.HttpContext
*/
package com.day.crx.delite.impl;
import java.io.IOException;
import java.net.URL;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.sling.auth.core.AuthenticationSupport;
import org.osgi.service.http.HttpContext;
class AuthHttpContext
implements HttpContext {
private AuthenticationSupport authenticator;
AuthHttpContext() {
}
public void setAuthenticationSupport(AuthenticationSupport auth) {
this.authenticator = auth;
}
public String getMimeType(String name) {
return null;
}
public URL getResource(String name) {
return null;
}
public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) throws IOException {
AuthenticationSupport localAuthenticator = this.authenticator;
if (localAuthenticator != null) {
return localAuthenticator.handleSecurity(request, response);
}
response.sendError(503);
response.flushBuffer();
return false;
}
}