Package org.apache.hive.service.auth.PlainSaslServer

Examples of org.apache.hive.service.auth.PlainSaslServer.ExternalAuthenticationCallback


  private static class PlainServerCallbackHandler implements CallbackHandler {

    @Override
    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
      ExternalAuthenticationCallback ac = null;
      for (int i = 0; i < callbacks.length; i++) {
        if (callbacks[i] instanceof ExternalAuthenticationCallback) {
          ac = (ExternalAuthenticationCallback) callbacks[i];
          break;
        } else {
          throw new UnsupportedCallbackException(callbacks[i]);
        }
      }

      if (ac != null) {
        PasswdAuthenticationProvider provider =
            AuthenticationProviderFactory.getAuthenticationProvider(ac.getAuthMethod());
        provider.Authenticate(ac.getUserName(), ac.getPasswd());
        ac.setAuthenticated(true);
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.hive.service.auth.PlainSaslServer.ExternalAuthenticationCallback

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.