elixirfm v1.0.1 Elixirfm.Auth
Functions for authenticating a user with Last.fm
Link to this section Summary
Functions
get_session/1 Fetches a session key for a user. It takes either the token returned after executing request_user_auth/1 or an anonymous function that returns the callback token as a string. This is the third step in the Last.fm authentication process.
request_user_auth/0 checks if the user is logged in to Last.fm, if not they will be redirected
to the login page before being asked to grant your web application permission to use their account.
You can optionally specify a callback URL that is different to your API Account callback url.
to do this see the request_user_auth/1
function
request_user_auth/1 includes the query param &cb=
. This allows you to have users to
forward to an alternate callback url of your site after the authorization process.
Link to this section Functions
get_session(callback_token)
get_session/1 Fetches a session key for a user. It takes either the token returned after executing request_user_auth/1 or an anonymous function that returns the callback token as a string. This is the third step in the Last.fm authentication process.
request_user_auth()
request_user_auth/0 checks if the user is logged in to Last.fm, if not they will be redirected
to the login page before being asked to grant your web application permission to use their account.
You can optionally specify a callback URL that is different to your API Account callback url.
to do this see the request_user_auth/1
function
request_user_auth(optional_callback_url)
request_user_auth/1 includes the query param &cb=
. This allows you to have users to
forward to an alternate callback url of your site after the authorization process.