1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.directory.server.ldap.handlers.sasl;
21
22
23 import javax.security.sasl.SaslException;
24 import javax.security.sasl.SaslServer;
25
26 import org.apache.directory.api.ldap.model.message.BindRequest;
27 import org.apache.directory.api.util.StringConstants;
28 import org.apache.directory.api.util.Strings;
29 import org.apache.directory.server.core.api.CoreSession;
30 import org.apache.directory.server.ldap.LdapSession;
31
32
33
34
35
36
37
38
39 public abstract class AbstractSaslServer implements SaslServer
40 {
41
42 private final BindRequest bindRequest;
43
44
45 private final LdapSession ldapSession;
46
47
48 private CoreSession adminSession;
49
50
51 public AbstractSaslServer( LdapSession ldapSession, CoreSession adminSession, BindRequest bindRequest )
52 {
53 this.bindRequest = bindRequest;
54 this.ldapSession = ldapSession;
55 this.adminSession = adminSession;
56 }
57
58
59
60
61
62
63
64 public byte[] unwrap( byte[] incoming, int offset, int len ) throws SaslException
65 {
66 return StringConstants.EMPTY_BYTES;
67 }
68
69
70
71
72
73
74
75 public byte[] wrap( byte[] outgoing, int offset, int len ) throws SaslException
76 {
77 return Strings.EMPTY_BYTES;
78 }
79
80
81
82
83
84 public BindRequest getBindRequest()
85 {
86 return bindRequest;
87 }
88
89
90
91
92
93 public LdapSession getLdapSession()
94 {
95 return ldapSession;
96 }
97
98
99
100
101
102 public CoreSession getAdminSession()
103 {
104 return adminSession;
105 }
106
107
108
109
110
111 public String getAuthorizationID()
112 {
113 return "";
114 }
115
116
117
118
119
120 public Object getNegotiatedProperty( String propName )
121 {
122 return "";
123 }
124
125
126
127
128
129 public void dispose() throws SaslException
130 {
131 }
132 }