com.askgeo.flt.base
Class Authorizer

java.lang.Object
  extended by com.askgeo.flt.base.Authorizer

public class Authorizer
extends java.lang.Object

Contains static methods for performing license file generation and authorization. This class is used internally and does not have any particular use to an end user.


Field Summary
static java.lang.String CHARSET
          The character set used to encode the license String.
 
Method Summary
static boolean authorize(java.lang.String s, java.lang.String oracle)
          Attempts to authorize the given license string for a given oracle name.
static java.lang.String generate(byte[] privateKeyEnc, java.lang.String email, java.util.Date expiresAt, java.lang.String... oracles)
          Generates a license string with the given parameters.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHARSET

public static final java.lang.String CHARSET
The character set used to encode the license String.

See Also:
Constant Field Values
Method Detail

authorize

public static boolean authorize(java.lang.String s,
                                java.lang.String oracle)
Attempts to authorize the given license string for a given oracle name.

Parameters:
s - is the license string.
oracle - is the oracle name, as returned by the getOracleName method on the map object.
Returns:
true if the authorization was successful, and false otherwise.

generate

public static java.lang.String generate(byte[] privateKeyEnc,
                                        java.lang.String email,
                                        java.util.Date expiresAt,
                                        java.lang.String... oracles)
                                 throws java.lang.Exception
Generates a license string with the given parameters.

Parameters:
privateKeyEnc - is the private key
email - is the email associated with license.
expiresAt - is the date after which the license is no longer valid.
oracles - are the names of the oracles to include in the license file.
Returns:
the license string.
Throws:
java.lang.Exception


Copyright © 2012 Vector Magic, Inc.