Package org.glassfish.security.services.api.authentication

Examples of org.glassfish.security.services.api.authentication.AuthenticationService


    @SecurityScope
    public AuthenticationService provide() {
        String currentState = manager.getCurrent();

        // Get Service Instance
        AuthenticationService atnService = AccessController.doPrivileged(
                new PrivilegedLookup<AuthenticationService>(
                        serviceLocator, AuthenticationService.class));

        // Get Service Configuration
        org.glassfish.security.services.config.AuthenticationService atnConfiguration =
            serviceLocator.getService(org.glassfish.security.services.config.AuthenticationService.class,currentState);

        // Initialize Service
        atnService.initialize(atnConfiguration);

        return atnService;
    }
View Full Code Here


     }

  @Override
  public Object authenticate(String username, String password) {
    gf = getGlassFish();
    AuthenticationService authService = null;
    try{
            authService = getAuthService();
    }catch(GlassFishException gfe){
      gfe.printStackTrace();
      return null;
    }

        Subject fs = null;

       try {
         fs = authService.login(username, password.toCharArray(), fs);
        } catch (LoginException e) {     
          e.printStackTrace();
          return null;
        }
View Full Code Here

    @SecurityScope
    public AuthenticationService provide() {
        String currentState = manager.getCurrent();

        // Get Service Instance
        AuthenticationService atnService = serviceLocator.getService(AuthenticationService.class);

        // Get Service Configuration
        org.glassfish.security.services.config.AuthenticationService atnConfiguration =
            serviceLocator.getService(org.glassfish.security.services.config.AuthenticationService.class,currentState);

        // Initialize Service
        atnService.initialize(atnConfiguration);

        return atnService;
    }
View Full Code Here

    @SecurityScope
    public AuthenticationService provide() {
        String currentState = manager.getCurrent();

        // Get Service Instance
        AuthenticationService atnService = AccessController.doPrivileged(
                new PrivilededLookup<AuthenticationService>(
                        serviceLocator, AuthenticationService.class));

        // Get Service Configuration
        org.glassfish.security.services.config.AuthenticationService atnConfiguration =
            serviceLocator.getService(org.glassfish.security.services.config.AuthenticationService.class,currentState);

        // Initialize Service
        atnService.initialize(atnConfiguration);

        return atnService;
    }
View Full Code Here

     }

  @Override
  public Object authenticate(String username, String password) {
    gf = getGlassFish();
    AuthenticationService authService = null;
    try{
        authService = gf.getService(AuthenticationService.class);
    }catch(GlassFishException gfe){
      gfe.printStackTrace();
      return null;
    }

        Subject fs = null;

       try {
         fs = authService.login(username, password.toCharArray(), fs);
        } catch (LoginException e) {     
          e.printStackTrace();
          return null;
        }
View Full Code Here

TOP

Related Classes of org.glassfish.security.services.api.authentication.AuthenticationService

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.