provider.go 367 B

123456789101112
  1. // Copyright 2017 Frédéric Guillot. All rights reserved.
  2. // Use of this source code is governed by the Apache 2.0
  3. // license that can be found in the LICENSE file.
  4. package oauth2
  5. // Provider is an interface for OAuth2 providers.
  6. type Provider interface {
  7. GetUserExtraKey() string
  8. GetRedirectURL(state string) string
  9. GetProfile(code string) (*Profile, error)
  10. }