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
|
@ -24,14 +24,14 @@ import (
|
|||
type OAuth2Strategy interface {
|
||||
Config() oauth2.Config
|
||||
|
||||
AuthCodeURL(verifier string, state string) AuthUrl
|
||||
AuthCodeURL(verifier string, state string) AuthURL
|
||||
|
||||
ExchangeToken(code CodeResponse, verifier string) (*oauth2.Token, error)
|
||||
}
|
||||
|
||||
type AuthUrl struct {
|
||||
type AuthURL struct {
|
||||
// The URL the user must visit to approve access
|
||||
Url string
|
||||
URL string
|
||||
// Random state string passed on to the callback.
|
||||
// Leave empty if the service does not support state.
|
||||
State string
|
||||
|
@ -56,10 +56,10 @@ func (s StandardStrategy) Config() oauth2.Config {
|
|||
return s.conf
|
||||
}
|
||||
|
||||
func (s StandardStrategy) AuthCodeURL(verifier string, state string) AuthUrl {
|
||||
func (s StandardStrategy) AuthCodeURL(verifier string, state string) AuthURL {
|
||||
url := s.conf.AuthCodeURL(state, oauth2.AccessTypeOffline, oauth2.S256ChallengeOption(verifier))
|
||||
return AuthUrl{
|
||||
Url: url,
|
||||
return AuthURL{
|
||||
URL: url,
|
||||
State: state,
|
||||
Param: "code",
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue