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.Strings;
28 import org.apache.directory.server.core.api.CoreSession;
29 import org.apache.directory.server.ldap.LdapSession;
30
31
32
33
34
35
36
37
38 public abstract class AbstractSaslServer implements SaslServer
39 {
40
41 private final BindRequest bindRequest;
42
43
44 private final LdapSession ldapSession;
45
46
47 private CoreSession adminSession;
48
49
50 public AbstractSaslServer( LdapSession ldapSession, CoreSession adminSession, BindRequest bindRequest )
51 {
52 this.bindRequest = bindRequest;
53 this.ldapSession = ldapSession;
54 this.adminSession = adminSession;
55 }
56
57
58
59
60
61
62
63 public byte[] unwrap( byte[] incoming, int offset, int len ) throws SaslException
64 {
65 return Strings.EMPTY_BYTES;
66 }
67
68
69
70
71
72
73
74 public byte[] wrap( byte[] outgoing, int offset, int len ) throws SaslException
75 {
76 return Strings.EMPTY_BYTES;
77 }
78
79
80
81
82
83 public BindRequest getBindRequest()
84 {
85 return bindRequest;
86 }
87
88
89
90
91
92 public LdapSession getLdapSession()
93 {
94 return ldapSession;
95 }
96
97
98
99
100
101 public CoreSession getAdminSession()
102 {
103 return adminSession;
104 }
105
106
107
108
109
110 public String getAuthorizationID()
111 {
112 return "";
113 }
114
115
116
117
118
119 public Object getNegotiatedProperty( String propName )
120 {
121 return "";
122 }
123
124
125
126
127
128 public void dispose() throws SaslException
129 {
130 }
131 }