Package javax.security.auth.callback

Examples of javax.security.auth.callback.UnsupportedCallbackException


                      password = credential.getCredentialsAsCharArray();
                    }
                pc.setPassword(password);
                credentials = password;
              } else {
                throw new UnsupportedCallbackException(callbacks[i], "Unrecognized Callback"); //$NON-NLS-1$
              }
            }
          }
            };       
             
View Full Code Here


              ((NameCallback) callback).setName(username);
            } else if (callback instanceof PasswordCallback) {
              ((PasswordCallback) callback).setPassword(password
                  .toCharArray());
            } else {
              throw new UnsupportedCallbackException(callback,
                  "Callback class not supported");
            }
          }
        }
       
View Full Code Here

              ((NameCallback) callback).setName(username);
            } else if (callback instanceof PasswordCallback) {
              ((PasswordCallback) callback).setPassword((password+"wrong")
                  .toCharArray());
            } else {
              throw new UnsupportedCallbackException(callback,
                  "Callback class not supported");
            }
          }
        }
       
View Full Code Here

                    else if (callback instanceof PasswordCallback) {
                        PasswordCallback passwordCallback = (PasswordCallback)callback;
                        passwordCallback.setPassword(password.toCharArray());
                    }
                    else {
                        throw new UnsupportedCallbackException(callback, "Unrecognized Callback: " + callback); //$NON-NLS-1$
                    }
                }           
           
          }
        }, jaasConfig);
View Full Code Here

                  ((NameCallback) callbacks[i]).setName("");
                } else if (callbacks[i] instanceof PasswordCallback) {
                  ((PasswordCallback) callbacks[i]).setPassword(""
                      .toCharArray());
                } else {
                  throw new UnsupportedCallbackException(callbacks[i],
                      "Callback class not supported");
                }

              }
             
View Full Code Here

        ((NameCallback) callbacks[i]).setName(userName);
      } else if (callbacks[i] instanceof PasswordCallback) {
        ((PasswordCallback) callbacks[i]).setPassword(password
            .toCharArray());
      } else {
        throw new UnsupportedCallbackException(callbacks[i],
            "Callback class not supported");
      }

    }
  }
View Full Code Here

                }
                PasswordCallback cb = (PasswordCallback) callbacks[i];
                cb.setPassword(password);

            } else {
                throw new UnsupportedCallbackException(callbacks[i]);
            }
        }
    }
View Full Code Here

                pc.setPassword(password);
            }
           
          /* Cannot Handle other request */
            else {
                throw new UnsupportedCallbackException(callbacks[i], "Unrecognized Callback");
            }
        }
   
  }
View Full Code Here

        } else if (c instanceof AuthorizeCallback) {
          ((AuthorizeCallback) c).setAuthorized(true);
        } else if (c instanceof RealmCallback) {
          ((RealmCallback) c).setText(REALM);
        } else {
          throw new UnsupportedCallbackException(c);
        }
      }
    }
View Full Code Here

                        if (callback instanceof NameCallback) {
                            ((NameCallback) callback).setName(username);
                        } else if (callback instanceof PasswordCallback) {
                            ((PasswordCallback) callback).setPassword(password.toCharArray());
                        } else {
                            throw new UnsupportedCallbackException(callback);
                        }
                    }
                }
            });
            loginContext.login();
View Full Code Here

TOP

Related Classes of javax.security.auth.callback.UnsupportedCallbackException

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.