nl.gx.webmanager.handler.forms.handling
Class GeneratedKey

java.lang.Object
  extended by nl.gx.webmanager.handler.forms.handling.GeneratedKey

public class GeneratedKey
extends java.lang.Object

Used by registration servlet and confirmationhandler for email confirmation during the webuser registration.


Constructor Summary
GeneratedKey(java.lang.String username, long date, java.lang.String random)
          Creates a new GeneratedKey for these three parameters.
 
Method Summary
 long getDate()
           
 java.lang.String getEncodedKey()
           
static GeneratedKey getInstance(java.lang.String encodedKey)
          Used to verify whether the activation link that is sent to a user is correct.
 java.lang.String getUsername()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneratedKey

public GeneratedKey(java.lang.String username,
                    long date,
                    java.lang.String random)
Creates a new GeneratedKey for these three parameters.

Parameters:
username -
date -
random -
Method Detail

getUsername

public java.lang.String getUsername()
Returns:
username.

getDate

public long getDate()
Returns:
date as a long.

getEncodedKey

public java.lang.String getEncodedKey()
                               throws java.io.UnsupportedEncodingException,
                                      java.security.GeneralSecurityException
Returns:
generated key for username, date & random
Throws:
java.io.UnsupportedEncodingException
java.security.GeneralSecurityException

getInstance

public static GeneratedKey getInstance(java.lang.String encodedKey)
                                throws java.io.UnsupportedEncodingException,
                                       java.security.GeneralSecurityException
Used to verify whether the activation link that is sent to a user is correct. If the key in this link is ok the key decodes.

Parameters:
encodedKey -
Returns:
A GeneratedKey decoded from the encodedKey
Throws:
java.io.UnsupportedEncodingException
java.security.GeneralSecurityException - if the key does not decode succesfully


Copyright © 2007-2011 GX Software BV. All Rights Reserved.