equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
108 * @param props can be null |
108 * @param props can be null |
109 * @param cbh can be null for Sasl, but will throw NPE in auth for NTLM |
109 * @param cbh can be null for Sasl, but will throw NPE in auth for NTLM |
110 * @throws SaslException |
110 * @throws SaslException |
111 */ |
111 */ |
112 NTLMServer(String mech, String protocol, String serverName, |
112 NTLMServer(String mech, String protocol, String serverName, |
113 Map props, final CallbackHandler cbh) throws SaslException { |
113 Map<String, ?> props, final CallbackHandler cbh) |
|
114 throws SaslException { |
114 |
115 |
115 this.mech = mech; |
116 this.mech = mech; |
116 String version = null; |
117 String version = null; |
117 String domain = null; |
118 String domain = null; |
118 Random rtmp = null; |
119 Random rtmp = null; |
208 throw new UnsupportedOperationException("Not supported yet."); |
209 throw new UnsupportedOperationException("Not supported yet."); |
209 } |
210 } |
210 |
211 |
211 @Override |
212 @Override |
212 public Object getNegotiatedProperty(String propName) { |
213 public Object getNegotiatedProperty(String propName) { |
213 if (propName.equals(Sasl.QOP)) { |
214 switch (propName) { |
214 return "auth"; |
215 case Sasl.QOP: |
215 } else if (propName.equals(NTLM_HOSTNAME)) { |
216 return "auth"; |
216 return hostname; |
217 case NTLM_HOSTNAME: |
217 } else { |
218 return hostname; |
218 return null; |
219 default: |
|
220 return null; |
219 } |
221 } |
220 } |
222 } |
221 |
223 |
222 @Override |
224 @Override |
223 public void dispose() throws SaslException { |
225 public void dispose() throws SaslException { |