Package javax.security.auth.callback

Examples of javax.security.auth.callback.PasswordCallback.clearPassword()


/* 186 */       char[] tmpPassword = pc.getPassword();
/* 187 */       if (tmpPassword != null)
/*     */       {
/* 189 */         password = new char[tmpPassword.length];
/* 190 */         System.arraycopy(tmpPassword, 0, password, 0, tmpPassword.length);
/* 191 */         pc.clearPassword();
/*     */       }
/* 193 */       this.loginCredential = password;
/* 194 */       if (this.trace)
/*     */       {
/* 196 */         String credType = "null";
View Full Code Here


         char[] tmpPassword = pc.getPassword();
         if( tmpPassword != null )
         {
            credential = new char[tmpPassword.length];
            System.arraycopy(tmpPassword, 0, credential, 0, tmpPassword.length);
            pc.clearPassword();
            password = new String(credential);
         }
      }
      catch(IOException e)
      {
View Full Code Here

         tmpPassword = pc.getPassword();
         if (tmpPassword != null)
         {
            password = new char[tmpPassword.length];
            System.arraycopy(tmpPassword, 0, password, 0, tmpPassword.length);
            pc.clearPassword();
         }
      }
      catch (java.io.IOException ioe)
      {
         throw new LoginException(ioe.toString());
View Full Code Here

      throw new LoginException(
          "An unexpected error occured while trying to retrieve account information!");
    }

    // The password is zeroed before it gets GC'ed for memory security.
    passwordCallback.clearPassword();

    if (success) {
      principal = new ParticipantPrincipal(id);
      status = Status.OK;
      return true;
View Full Code Here

                LOGGER.severe("User or password are null");
                throw new LoginException("Login Failed for user " + username + "!!!");
            }

            password = PasswordEncoder.encodePassword(username, password);
            pc.clearPassword();
        } catch (Exception ex) {
            success = false;
            LoginException le = new LoginException("Login Failed!!!");
            LOGGER.log(Level.SEVERE, "Login Failed with username: {0} and password: xxxxxx", username);
            le.initCause(ex);
View Full Code Here

                LOGGER.severe("User or password are null");
                throw new LoginException("Login Failed for user " + username + "!!!");
            }

            password = PasswordEncoder.encodePassword(username, password);
            pc.clearPassword();
        } catch (Exception ex) {
            success = false;
            LoginException le = new LoginException("Login Failed!!!");
            LOGGER.severe("Login Failed with username: " + username + " and password: xxxxxx");
            le.initCause(ex);
View Full Code Here

                LOGGER.severe("User or password are null");
                throw new LoginException("Login Failed for user " + username + "!!!");
            }

            password = PasswordEncoder.encodePassword(username, password);
            pc.clearPassword();
        } catch (Exception ex) {
            success = false;
            LoginException le = new LoginException("Login Failed!!!");
            LOGGER.severe("Login Failed with username: " + username + " and password: xxxxxx");
            le.initCause(ex);
View Full Code Here

         char[] tmpPassword = pc.getPassword();
         if( tmpPassword != null )
         {
            credential = new char[tmpPassword.length];
            System.arraycopy(tmpPassword, 0, credential, 0, tmpPassword.length);
            pc.clearPassword();
            password = new String(credential);
         }
      }
      catch(IOException e)
      {
View Full Code Here

                                "Name: ", username);
                        PasswordCallback pcb = new PasswordCallback(
                                "Password: ", false);
                        cbh.handle(new Callback[] { rcb, ncb, pcb });
                        char[] passwd = pcb.getPassword();
                        pcb.clearPassword();
                        return passwd;
                    } catch (IOException ioe) {
                        return null;
                    } catch (UnsupportedCallbackException uce) {
                        return null;
View Full Code Here

            char[] tmpPassword = pc.getPassword();

            if (tmpPassword != null) {
                credential = new char[tmpPassword.length];
                System.arraycopy(tmpPassword, 0, credential, 0, tmpPassword.length);
                pc.clearPassword();
                password = new String(credential);
            }
        } catch (java.io.IOException ioe) {
            throw new LoginException(ioe.toString());
        } catch (UnsupportedCallbackException uce) {
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.