204205206207208209210211
public CallbackHandler getUsernamePasswordHandler(final String username, final String password) { if (StringUtils.isEmpty(username)) { return null; } else { return new NamePasswordCallbackHandler(username, password); } }
81828384858687
public void setRealmName(String name) { this.realmName = name; } protected CallbackHandler getCallbackHandler(String name, String password) { return new NamePasswordCallbackHandler(name, password); }
202203204205206207208209
75767778798081
80818283848586
205206207208209210211212
30313233343536
public CallbackHandler create(Message message) { AuthorizationPolicy policy = message.get(AuthorizationPolicy.class); if (policy == null) { return null; } return new NamePasswordCallbackHandler(policy.getUserName(), policy.getPassword()); }
32333435363738
SecurityToken token = message.get(SecurityToken.class); if (!(token instanceof UsernameToken)) { return null; } UsernameToken ut = (UsernameToken)token; return new NamePasswordCallbackHandler(ut.getName(), ut.getPassword()); }
54555657585960
return null; } Certificate cert = getCertificate(message); String name = certMapper.getUserName(cert); String password = nameToPasswordMapper.getPassword(name); return new NamePasswordCallbackHandler(name, password); }