public class Auth extends Object
| Constructor and Description |
|---|
Auth() |
| Modifier and Type | Method and Description |
|---|---|
static String |
generateMobileToken(String username,
String password)
This method can generate a token as required by
getMobileSession(java.lang.String, java.lang.String). |
static AuthenticatedGetQuery<Session> |
getMobileSession(String username,
String authToken)
Create a web service session for a user.
|
static AuthenticatedGetQuery<Session> |
getSession(String token)
Fetch a session key for a user.
|
public static AuthenticatedGetQuery<Session> getMobileSession(String username, String authToken)
username - The last.fm username. (Required).authToken - A 32-byte ASCII hexadecimal MD5 hash of the last.fm username and the user's
password hash. i.e. md5(username + md5(password)), where '+' represents a
concatenation. This can also be generated by generateMobileToken(java.lang.String, java.lang.String)
(Required).public static String generateMobileToken(String username, String password)
getMobileSession(java.lang.String, java.lang.String).username - The username of the last.fm user to authenticate.password - The password of the last.fm user to authenticatepublic static AuthenticatedGetQuery<Session> getSession(String token)
token - A 32-character ASCII hexadecimal MD5 hash returned by step 1
of the authentication process (following the granting of permissions to
the application by the user) (Required).Copyright © 2012. All Rights Reserved.