import "github.com/markbates/goth/providers/lastfm"
Package lastfm implements the OAuth protocol for authenticating users through LastFM. This package can be used as a reference impleentation of an OAuth provider for Goth.
type Provider struct { ClientKey string Secret string CallbackURL string UserAgent string HTTPClient *http.Client // contains filtered or unexported fields }
Provider is the implementation of `goth.Provider` for accessing LastFM
New creates a new LastFM provider, and sets up important connection details. You should always call `lastfm.New` to get a new Provider. Never try to craete one manullay.
BeginAuth asks LastFm for an authentication end-point
Debug is a no-op for the lastfm package.
FetchUser will go to LastFM and access basic information about the user.
GetSession token from LastFM
Name is the name used to retrive this provider later.
RefreshToken refresh token is not provided by lastfm
RefreshTokenAvailable refresh token is not provided by lastfm
SetName is to update the name of the provider (needed in case of multiple providers of 1 type)
UnmarshalSession will unmarshal a JSON string into a session.
Session stores data during the auth process with Lastfm.
Authorize the session with LastFM and return the access token to be stored for future use.
GetAuthURL will return the URL set by calling the `BeginAuth` function on the LastFM provider.
Marshal the session into a string
Package lastfm imports 13 packages (graph) and is imported by 43 packages. Updated 2018-01-16. Refresh now. Tools for package owners.