Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private boolean validateToken() throws SSOException
- {
- System.out.println("Validating token - "+tokenID);
- boolean validToken = false;
- manager = SSOTokenManager.getInstance();
- token = manager.createSSOToken(tokenID); // fails here
- // isValid method returns true for valid token.
- if (manager.isValidToken(token)) {
- // let us get all the values from the token
- String host = token.getHostName();
- java.security.Principal principal = token.getPrincipal();
- String authType = token.getAuthType();
- InetAddress ipAddress = token.getIPAddress();
- System.out.println("SSOToken host name: " + host);
- System.out.println("SSOToken Principal name: " +
- principal.getName());
- System.out.println("Authentication type used: " + authType);
- System.out.println("IPAddress of the host: " +
- ipAddress.getHostAddress());
- validToken = true;
- }
- System.out.println("Returning "+validToken);
- return false;
- }
Add Comment
Please, Sign In to add comment