Examples of AuthProvider


Examples of com.datastax.driver.core.AuthProvider

  private ProtocolOptions getProtocolOptions() {
     
    int port = cpConfig.getPort();
    int protocolVersion = -1; // use default
   
    AuthProvider authProvider = AuthProvider.NONE;
   
    AuthenticationCredentials creds = cpConfig.getAuthenticationCredentials();
    if (creds != null) {
      authProvider = new PlainTextAuthProvider(creds.getUsername(), creds.getPassword());
    }
View Full Code Here

Examples of com.feth.play.module.pa.providers.AuthProvider

    return u;
  }

  public static Result handleAuthentication(final String provider,
      final Context context, final Object payload) {
    final AuthProvider ap = getProvider(provider);
    if (ap == null) {
      // Provider wasn't found and/or user was fooling with our stuff -
      // tell him off:
      return Controller.notFound(Messages.get(
          "playauthenticate.core.exception.provider_not_found",
          provider));
    }
    try {
      final Object o = ap.authenticate(context, payload);
      if (o instanceof String) {
        return Controller.redirect((String) o);
      } else if (o instanceof Result) {
        return (Result) o;
      } else if (o instanceof AuthUser) {
View Full Code Here

Examples of java.security.AuthProvider

                } else {
                    isIndex = true;
                    nr = "1";
                }
                final P11Slot slot = P11Slot.getInstance(nr, sharedLibraryPath, isIndex, null, this, 0);// no CA set ID to 0 to indicate just one user
                final AuthProvider provider = (AuthProvider)slot.getProvider();
                final String providerName = provider.getName();
                final PasswordHandler handler = new PasswordHandler(password);
                provider.login(null, handler);
                handler.clean();
                System.setProperty("javax.net.ssl.keyStoreType", "pkcs11");
                System.setProperty("javax.net.ssl.keyStoreProvider", providerName);
                System.setProperty("javax.net.ssl.keyStore", "NONE");
                if ( trustStorePath==null ) {
View Full Code Here

Examples of java.security.AuthProvider

        // assumption is that KeyStore.load did a login -
        // perform explicit logout if possible
        LoginException logoutException = null;
        Provider provider = keyStore.getProvider();
        if (provider instanceof AuthProvider) {
            AuthProvider ap = (AuthProvider)provider;
            try {
                ap.logout();
                if (debug) {
                    debugPrint("logged out of KeyStore AuthProvider");
                }
            } catch (LoginException le) {
                // save but continue below
View Full Code Here

Examples of java.security.AuthProvider

        // assumption is that KeyStore.load did a login -
        // perform explicit logout if possible
        LoginException logoutException = null;
        Provider provider = keyStore.getProvider();
        if (provider instanceof AuthProvider) {
            AuthProvider ap = (AuthProvider)provider;
            try {
                ap.logout();
                if (debug) {
                    debugPrint("logged out of KeyStore AuthProvider");
                }
            } catch (LoginException le) {
                // save but continue below
View Full Code Here

Examples of org.brickred.socialauth.AuthProvider

      request.setAttribute("Message", "Status can't be left blank.");
      return "failure";
    }
    SASFHelper helper = SASFStaticHelper.getHelper(request);
    SocialAuthManager manager = helper.getAuthManager();
    AuthProvider provider = null;
    if (manager != null) {
      provider = manager.getCurrentAuthProvider();
    }
    if (provider != null) {
      try {
        provider.updateStatus(statusMessage);
        request.setAttribute("Message", "Status Updated successfully");
        return "success";
      } catch (SocialAuthException e) {
        request.setAttribute("Message", e.getMessage());
        e.printStackTrace();
View Full Code Here

Examples of org.brickred.socialauth.AuthProvider

  public String execute() throws Exception {

    SASFHelper helper = SASFStaticHelper.getHelper(request);
    SocialAuthManager manager = helper.getAuthManager();

    AuthProvider provider = null;
    if (manager != null) {
      provider = manager.getCurrentAuthProvider();
    }
    if (provider != null) {
      try {
        provider.uploadImage(statusMessage, imageFileFileName,
            new FileInputStream(imageFile));
        request.setAttribute("Message", "Status Updated successfully");
        return "success";
      } catch (SocialAuthException e) {
        request.setAttribute("Message", e.getMessage());
View Full Code Here

Examples of org.brickred.socialauth.AuthProvider

    String path = lookupPath(req);
    if (path != null && path.startsWith(h.getServletMain())) {
      try {
        if (path.equals(h.getServletSuccess())) {
          SocialAuthManager manager = h.getAuthManager();
          AuthProvider provider = manager.connect(SocialAuthUtil
              .getRequestParametersMap(req));
          h.setProvider(provider);
          res.sendRedirect(h.getWebappSuccessAction());
          return;
        } else {
View Full Code Here

Examples of org.brickred.socialauth.AuthProvider

  public Profile getProfile() {
    Profile profile = null;
    SocialAuthManager manager = getAuthManager();
    if (manager != null) {
      try {
        AuthProvider provider = manager.getCurrentAuthProvider();
        profile = provider.getUserProfile();

      } catch (Exception e) {
        e.printStackTrace();
      }
    }
View Full Code Here

Examples of org.brickred.socialauth.AuthProvider

    List<Contact> contactsList = null;
    SocialAuthManager manager = getAuthManager();
    if (manager != null) {
      contactsList = new ArrayList<Contact>();
      try {
        AuthProvider provider = manager.getCurrentAuthProvider();
        contactsList = provider.getContactList();
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
    return contactsList;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.