com.vodafone360.people.service.io.api
Class Auth

java.lang.Object
  extended by com.vodafone360.people.service.io.api.Auth

public class Auth
extends java.lang.Object

Implementation of Authentication APIs. These include APIs to login to an existing account, sign up to a new account, retrieve terms and conditions and privacy statement etc. To get access to the other API's and perform actions on behalf of a user, the application has first to authenticate the user, using some of these methods, so it can retrieve a User Session for authorising the user.


Field Summary
private static java.lang.String ACCEPTED_T_AND_C
           
private static int ACTIVATE_MOBILE_CLIENT_FLAG
           
private static java.lang.String BIRTHDATE
           
private static java.lang.String COUNTY_CODE
           
private static java.lang.String EMAIL
           
private static java.lang.String FLAGS
           
private static java.lang.String FULLNAME
           
private static java.lang.String FUNCTION_ACTIVATE
           
private static java.lang.String FUNCTION_GET_PRIVACY_STATEMENT
           
private static java.lang.String FUNCTION_GET_PUBLIC_KEY
           
private static java.lang.String FUNCTION_GET_SESSION
           
private static java.lang.String FUNCTION_GET_TERMS_AND_CONDITIONS
           
private static java.lang.String FUNCTION_GET_USERNAME_STATE
           
private static java.lang.String FUNCTION_REQUEST_ACTIVATION_CODE
           
private static java.lang.String FUNCTION_SIGNUP_USER_CRYPTED
           
private static java.lang.String LANGUAGE
           
private static java.lang.String LANGUAGE_CULTURE
           
private static java.lang.String MOBILE_MODE_ID
           
private static java.lang.String MOBILE_OPERATOR_ID
           
private static java.lang.String MSISDN
           
private static java.lang.String PASSWORD
           
private static java.lang.String SEND_CONFIRMAITON_SMS
           
private static java.lang.String SEND_CONFIRMATION_MAIL
           
private static java.lang.String SUBSCRIBE_TO_NEWSLETTER
           
private static java.lang.String TIMESTAMP
           
private static java.lang.String TIMEZONE
           
private static java.lang.String USERNAME
           
private static java.lang.String VALUE
           
 
Constructor Summary
Auth()
           
 
Method Summary
static int activate(BaseEngine engine, java.lang.String code)
          Implementation of "auth/activate" API.
private static java.lang.String getLocalString()
          Returns the Local string in a formation suitable for the back end.
static int getPrivacyStatement(BaseEngine engine)
          Request Privacy statement from back-end.
static int getPublicKey(BaseEngine engine)
          Implementation of "auth/getpublickey" API.
static int getSessionByCredentials(BaseEngine engine, java.lang.String username, java.lang.String password, java.util.Map<java.lang.String,java.util.List<java.lang.String>> more)
          Implementation of "getsessionbycredentials" API.
static int getTermsAndConditions(BaseEngine engine)
          Implementation of "auth/gettermsandconditions" API.
static int getUsernameState(BaseEngine engine, java.lang.String username)
          Implementation of "auth/getusernamestate" API.
static int requestActivationCode(BaseEngine engine, java.lang.String username, java.lang.String mobileNumber)
          Implementation of "auth/requestactivationcode" API.
static int signupUserCrypted(BaseEngine engine, java.lang.String fullname, java.lang.String username, byte[] password, long timestamp, java.lang.String email, java.lang.String birthDate, java.lang.String msisdn, java.lang.Boolean acceptedTAndC, java.lang.String countryCode, java.lang.String timezone, java.lang.String language, java.lang.Long mobileOperatorId, java.lang.Long mobileModelId, java.lang.Boolean sendConfirmationMail, java.lang.Boolean sendConfirmationSms, java.lang.Boolean subscribeToNewsletter)
          Implementation of "auth/signupusercrypted" API.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FUNCTION_GET_SESSION

private static final java.lang.String FUNCTION_GET_SESSION
See Also:
Constant Field Values

FUNCTION_ACTIVATE

private static final java.lang.String FUNCTION_ACTIVATE
See Also:
Constant Field Values

FUNCTION_GET_USERNAME_STATE

private static final java.lang.String FUNCTION_GET_USERNAME_STATE
See Also:
Constant Field Values

FUNCTION_REQUEST_ACTIVATION_CODE

private static final java.lang.String FUNCTION_REQUEST_ACTIVATION_CODE
See Also:
Constant Field Values

FUNCTION_SIGNUP_USER_CRYPTED

private static final java.lang.String FUNCTION_SIGNUP_USER_CRYPTED
See Also:
Constant Field Values

FUNCTION_GET_PUBLIC_KEY

private static final java.lang.String FUNCTION_GET_PUBLIC_KEY
See Also:
Constant Field Values

FUNCTION_GET_TERMS_AND_CONDITIONS

private static final java.lang.String FUNCTION_GET_TERMS_AND_CONDITIONS
See Also:
Constant Field Values

FUNCTION_GET_PRIVACY_STATEMENT

private static final java.lang.String FUNCTION_GET_PRIVACY_STATEMENT
See Also:
Constant Field Values

ACCEPTED_T_AND_C

private static final java.lang.String ACCEPTED_T_AND_C
See Also:
Constant Field Values

BIRTHDATE

private static final java.lang.String BIRTHDATE
See Also:
Constant Field Values

COUNTY_CODE

private static final java.lang.String COUNTY_CODE
See Also:
Constant Field Values

EMAIL

private static final java.lang.String EMAIL
See Also:
Constant Field Values

FLAGS

private static final java.lang.String FLAGS
See Also:
Constant Field Values

FULLNAME

private static final java.lang.String FULLNAME
See Also:
Constant Field Values

LANGUAGE

private static final java.lang.String LANGUAGE
See Also:
Constant Field Values

LANGUAGE_CULTURE

private static final java.lang.String LANGUAGE_CULTURE
See Also:
Constant Field Values

MOBILE_MODE_ID

private static final java.lang.String MOBILE_MODE_ID
See Also:
Constant Field Values

MOBILE_OPERATOR_ID

private static final java.lang.String MOBILE_OPERATOR_ID
See Also:
Constant Field Values

MSISDN

private static final java.lang.String MSISDN
See Also:
Constant Field Values

PASSWORD

private static final java.lang.String PASSWORD
See Also:
Constant Field Values

SEND_CONFIRMATION_MAIL

private static final java.lang.String SEND_CONFIRMATION_MAIL
See Also:
Constant Field Values

SEND_CONFIRMAITON_SMS

private static final java.lang.String SEND_CONFIRMAITON_SMS
See Also:
Constant Field Values

SUBSCRIBE_TO_NEWSLETTER

private static final java.lang.String SUBSCRIBE_TO_NEWSLETTER
See Also:
Constant Field Values

TIMESTAMP

private static final java.lang.String TIMESTAMP
See Also:
Constant Field Values

TIMEZONE

private static final java.lang.String TIMEZONE
See Also:
Constant Field Values

USERNAME

private static final java.lang.String USERNAME
See Also:
Constant Field Values

VALUE

private static final java.lang.String VALUE
See Also:
Constant Field Values

ACTIVATE_MOBILE_CLIENT_FLAG

private static final int ACTIVATE_MOBILE_CLIENT_FLAG
See Also:
Constant Field Values
Constructor Detail

Auth

public Auth()
Method Detail

getSessionByCredentials

public static int getSessionByCredentials(BaseEngine engine,
                                          java.lang.String username,
                                          java.lang.String password,
                                          java.util.Map<java.lang.String,java.util.List<java.lang.String>> more)
Implementation of "getsessionbycredentials" API. Used to login to an existing VF360 account.

Parameters:
engine - Handle to LoginEngine which handles requests using this API.
username - User-name for account.
password - Password for account.
more - Additional login details or NULL.
Returns:
Request ID generated for this request.
Throws:
java.lang.NullPointerException - when engine is NULL
java.lang.NullPointerException - when username is NULL
java.lang.NullPointerException - when password is NULL

activate

public static int activate(BaseEngine engine,
                           java.lang.String code)
Implementation of "auth/activate" API.

Parameters:
engine - Handle to LoginEngine which handles requests using this API.
code - Activation code for this account
Returns:
Request ID generated for this request.
Throws:
java.lang.NullPointerException - when engine is NULL

getUsernameState

public static int getUsernameState(BaseEngine engine,
                                   java.lang.String username)
Implementation of "auth/getusernamestate" API.

Parameters:
engine - Handle to LoginEngine which handles requests using this API.
username - User name for this account.
Returns:
Request id generated for this request.
Throws:
java.lang.NullPointerException - when engine is NULL

requestActivationCode

public static int requestActivationCode(BaseEngine engine,
                                        java.lang.String username,
                                        java.lang.String mobileNumber)
Implementation of "auth/requestactivationcode" API.

Parameters:
engine - Handle to LoginEngine which handles requests using this API.
username - User-name for this account.
mobileNumber - Mobile number for this activation code to be sent.
Returns:
Request ID generated for this request.
Throws:
java.lang.NullPointerException - when engine is NULL
java.lang.NullPointerException - when mobileNumber is NULL

signupUserCrypted

public static int signupUserCrypted(BaseEngine engine,
                                    java.lang.String fullname,
                                    java.lang.String username,
                                    byte[] password,
                                    long timestamp,
                                    java.lang.String email,
                                    java.lang.String birthDate,
                                    java.lang.String msisdn,
                                    java.lang.Boolean acceptedTAndC,
                                    java.lang.String countryCode,
                                    java.lang.String timezone,
                                    java.lang.String language,
                                    java.lang.Long mobileOperatorId,
                                    java.lang.Long mobileModelId,
                                    java.lang.Boolean sendConfirmationMail,
                                    java.lang.Boolean sendConfirmationSms,
                                    java.lang.Boolean subscribeToNewsletter)
Implementation of "auth/signupusercrypted" API. Encrypted signup to new account.

Parameters:
engine - Handle to LoginEngine which handles requests using this API.
fullname - Full name of user
username - Username chosen for new account
password - Password chosen for new account
timestamp - Current timestamp.
email - Email address associated with this account.
birthDate - Birthday of user signing up (there is a minimum age limit for users).
msisdn - MSIDN for user.
acceptedTAndC - Whether user has accepted terms and conditions.
countryCode - String identifier identifying country.
timezone - Timezone identifier.
language - Lauguage identifier.
mobileOperatorId - ID of mobile operator.
mobileModelId - Mobile device ID.
sendConfirmationMail - True if confirmation email to be sent to user.
sendConfirmationSms - True if confirmation SMS to be sent to user.
subscribeToNewsletter - True if user wishes to subscribe to newsletter.
Returns:
Request ID generated for this request.
Throws:
java.lang.NullPointerException - when engine is NULL
java.lang.NullPointerException - when acceptedTAndC is NULL
java.lang.NullPointerException - when mobileOperatorId is NULL
java.lang.NullPointerException - when mobileModelId is NULL
java.lang.NullPointerException - when sendConfirmationMail is NULL
java.lang.NullPointerException - when sendConfirmationSms is NULL
java.lang.NullPointerException - when subscribeToNewsletter is NULL

getPublicKey

public static int getPublicKey(BaseEngine engine)
Implementation of "auth/getpublickey" API.

Parameters:
engine - Handle to LoginEngine which handles requests using this API.
Returns:
Request ID generated for this request.
Throws:
java.lang.NullPointerException - when engine is NULL

getTermsAndConditions

public static int getTermsAndConditions(BaseEngine engine)
Implementation of "auth/gettermsandconditions" API.

Parameters:
engine - Handle to LoginEngine which handles requests using this API.
Returns:
request ID generated for this request.
Throws:
java.lang.NullPointerException - when engine is NULL

getPrivacyStatement

public static int getPrivacyStatement(BaseEngine engine)
Request Privacy statement from back-end.

Parameters:
engine - Handle to LoginEngine which handles requests using this API.
Returns:
request ID generated for this request.
Throws:
java.lang.NullPointerException - when engine is NULL

getLocalString

private static java.lang.String getLocalString()
Returns the Local string in a formation suitable for the back end.

Returns:
Local as a String


JavaDoc