mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 05:37:05 +02:00
lastfm: authentication
This commit is contained in:
parent
3ccbb20a9e
commit
5b8f4788f9
10 changed files with 158 additions and 15 deletions
|
@ -33,8 +33,13 @@ func (s deezerStrategy) Config() oauth2.Config {
|
|||
return s.conf
|
||||
}
|
||||
|
||||
func (s deezerStrategy) AuthCodeURL(verifier string, state string) string {
|
||||
return s.conf.AuthCodeURL(state, oauth2.AccessTypeOffline, oauth2.S256ChallengeOption(verifier))
|
||||
func (s deezerStrategy) AuthCodeURL(verifier string, state string) auth.AuthUrl {
|
||||
url := s.conf.AuthCodeURL(state, oauth2.AccessTypeOffline, oauth2.S256ChallengeOption(verifier))
|
||||
return auth.AuthUrl{
|
||||
Url: url,
|
||||
State: state,
|
||||
Param: "code",
|
||||
}
|
||||
}
|
||||
|
||||
func (s deezerStrategy) ExchangeToken(code auth.CodeResponse, verifier string) (*oauth2.Token, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue