authenticate()
AuthenticationResponse authenticate(AuthenticationRequest authenticationRequest)
This method authenticates credentials for Smile subscriptions and returns the subscription's USN. Use this method when you need to validate customer credentials.
You cannot use this method to log in to Smile.
Parameters
- authenticationRequest
- Format: AuthenticationRequest XML
Example: Authenticate a username and password
This example authenticates a username and password. The authentication request type is 1.
<AuthenticationRequest xmlns="http://xml.inomial.com/smile/2.xsd">
<AuthenticationRequestType>1</AuthenticationRequestType>
<Parameters>
<Object>
<String name="username">joe@example.com</String>
<String name="password">password</String>
<Integer name="serviceType">2<Integer>
</Object>
</Parameters>
</AuthenticationRequest>
Results
This method returns an AuthenticationResponse XML document that contains the authentication results. If the authentication is successful, the document also contains the subscription's USN.
There are no messages defined by this method.
Example: A returned AuthenticationResponse document
This example shows a successful authentication response. Note the subscription's USN is included in the response.
<AuthenticationResponse xmlns="http://xml.inomial.com/smile/2.xsd">
<Success>true</Success>
<USN>1923102312</USN>
</AuthenticationResponse>
Faults
AuthenticationExceptionThis fault is returned when the request is invalid or the caller does not have permission to perform this action.
Java client syntax
java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.Authenticate filename
- filename
- Purpose: Defines the filename of the AuthenticationRequest XML document.