mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 05:37:05 +02:00
Code style: All uppercase acronyms URL, ISRC, ID, HTTP
This commit is contained in:
parent
39b31fc664
commit
d51c97c648
26 changed files with 137 additions and 137 deletions
|
@ -25,21 +25,21 @@ import (
|
|||
|
||||
type lastfmStrategy struct {
|
||||
client *lastfm.Api
|
||||
redirectUrl *url.URL
|
||||
redirectURL *url.URL
|
||||
}
|
||||
|
||||
func (s lastfmStrategy) Config() oauth2.Config {
|
||||
return oauth2.Config{}
|
||||
}
|
||||
|
||||
func (s lastfmStrategy) AuthCodeURL(verifier string, state string) auth.AuthUrl {
|
||||
func (s lastfmStrategy) AuthCodeURL(verifier string, state string) auth.AuthURL {
|
||||
// Last.fm does not use OAuth2, but the provided authorization flow with
|
||||
// callback URL is close enough we can shoehorn it into the existing
|
||||
// authentication strategy.
|
||||
// TODO: Investigate and use callback-less flow with api.GetAuthTokenUrl(token)
|
||||
url := s.client.GetAuthRequestUrl(s.redirectUrl.String())
|
||||
return auth.AuthUrl{
|
||||
Url: url,
|
||||
url := s.client.GetAuthRequestUrl(s.redirectURL.String())
|
||||
return auth.AuthURL{
|
||||
URL: url,
|
||||
State: "", // last.fm does not use state
|
||||
Param: "token",
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue