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 package net.sf.jguard.core.authentication.schemes;
30
31 import java.security.PermissionCollection;
32 import java.util.ArrayList;
33 import java.util.Collection;
34 import java.util.List;
35 import java.util.Map;
36 import javax.security.auth.callback.Callback;
37 import javax.security.auth.callback.UnsupportedCallbackException;
38 import net.sf.jguard.core.authentication.AccessContext;
39 import net.sf.jguard.core.authentication.AuthenticationException;
40 import net.sf.jguard.core.authentication.bindings.AuthenticationBindingsFactory;
41 import net.sf.jguard.core.authorization.permissions.JGPositivePermissionCollection;
42
43
44
45
46
47
48
49 public class HookFormSchemeHandler implements AuthenticationSchemeHandler{
50
51 public HookFormSchemeHandler(Map<String,String> parameters,AuthenticationBindingsFactory factory){
52
53 }
54
55 public String getName() {
56 return "HOOK";
57 }
58
59
60 public void buildChallenge(AccessContext context) throws AuthenticationException {
61 throw new UnsupportedOperationException("Not supported yet.");
62 }
63
64
65
66 public void authenticationSucceed(AccessContext context) throws AuthenticationException {
67
68 }
69
70 public void authenticationFailed(AccessContext context) throws AuthenticationException {
71
72 }
73
74 public Collection<Class> getCallbackTypes() {
75 return new ArrayList<Class>();
76 }
77
78
79 public PermissionCollection getGrantedPermissions() {
80 return new JGPositivePermissionCollection();
81 }
82
83 public boolean answerToChallenge(AccessContext context) {
84 return true;
85 }
86
87 public void handleSchemeCallbacks(AccessContext context, List<Callback> cbks) throws UnsupportedCallbackException {
88 throw new UnsupportedOperationException("Not supported yet.");
89 }
90
91 }