13.07.2015 Views

IBM WebSphere V5.0 Security - CGISecurity

IBM WebSphere V5.0 Security - CGISecurity

IBM WebSphere V5.0 Security - CGISecurity

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

lc=new LoginContext("ClientContainer", newWSStdinCallbackHandlerImpl() );}// using the graphical interface to collect the login informationif(logintype.equals("gui")) {System.out.println("Performing GUI login...");lc=new LoginContext("ClientContainer", new WSGUICallbackHandlerImpl());}// collecting the login information from command line and// login directly without prompting for user name, password and realmif(lc==null) {System.out.println("Performing silent login...");lc=new LoginContext("ClientContainer", newWSCallbackHandlerImpl(loginuid,loginrealm,loginpwd));}// exception handling} catch (LoginException le) {System.out.println("Cannot create LoginContext. " + le.getMessage());// insert error processing codereturn;} catch (<strong>Security</strong>Exception se) {System.out.println("Cannot create LoginContext." + se.getMessage());se.printStackTrace(System.out);// Insert error processingreturn;}// performin login based on the login contexttry {lc.login();// exception handling} catch (LoginException le) {System.out.println("Fails to create Subject. " + le.getMessage());le.printStackTrace(System.out);return;}}...Besides the J2EE container, the client requires a properties file for the JAASlogin configuration; a configuration file for CSIv2 and <strong>IBM</strong> SAS configuration; andkeystore files for SSL communicaiton.210 <strong>IBM</strong> <strong>WebSphere</strong> <strong>V5.0</strong> <strong>Security</strong> Handbook

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!