Code style: All uppercase acronyms URL, ISRC, ID, HTTP

This commit is contained in:
Philipp Wolfer 2025-04-29 13:23:41 +02:00
parent 39b31fc664
commit d51c97c648
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
26 changed files with 137 additions and 137 deletions

View file

@ -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",
}