Advertisement
Guest User

Untitled

a guest
Aug 4th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. Context context = new InitialContext();
  2. String user = (String) context.lookup("cell/persistent/ADBindUser");
  3. String password = (String) context.lookup("cell/persistent/ADBindPwd");
  4.  
  5. Map<String, String> map = new HashMap<String, String>();
  6. map.put(Constants.MAPPING_ALIAS, "WPSBIND");
  7.  
  8. CallbackHandler callbackHandler =new WSMappingCallbackHandler(map, null);
  9.  
  10. LoginContext loginContext =
  11. new LoginContext("DefaultPrincipalMapping", callbackHandler);
  12. try{
  13. loginContext.login();
  14. }catch(LoginException le) {
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement