Kodexempel

Engångskoder - Java - Managed

String ACCESS_USERNAME = "accessusername";
String ACCESS_PASSWORD = "accesspassword";

String username = "myuser"; // Get from form
String password = "mypass"; // Get from form
String otp      = "123456"; // Get from form
  
Authenticator au = new Authenticator();
AuthenticatorSoap auth = au.getAuthenticatorSoap();

AuthenticatorCredential c = new AuthenticatorCredential();
c.setUsername( ACCESS_USERNAME );
c.setPassword( ACCESS_PASSWORD );

Attempt a = new Attempt();
a.setUsername( username );
a.setOtp( otp );

SimpleAssertion sa = auth.validateOTP( c, a );

System.out.println("RESULT: " + sa.isValidated());

if ( true.equals( sa.isValidated() ) {
   // Fedlogin success -> Verify local static password

   /* if ( localAuthenticationMechanismValidates( username, password ) ) {
    *   // SUCCESS
    * } else {
    *   // FAILURE
    * }
    */
} else {
   // Fedlogin failed
   System.out.println("FAILED -> status: " + sa.getStatus() + ", message: " + sa.getMessage());
}

							

Fedlogin features products from Vasco Data Security
Fedlogin features products from Deepnet Security Ltd.
Fedlogin is protected by Thawte, Inc.
Fedlogin features products from Cisco Systems, Inc.
Fedlogin features products from Hewlett-Packard