aboutsummaryrefslogtreecommitdiff
path: root/server/auth/provider.go
blob: 9d1c8bd3b9538469078e1c27d00ae1afc6374c27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package auth

import "golang.org/x/oauth2"

// Provider is an abstraction of different auth methods.
type Provider interface {
	Name() string
	StartSession(string) string
	Exchange(string) (*oauth2.Token, error)
	Username(*oauth2.Token) string
	Valid(*oauth2.Token) bool
	Revoke(*oauth2.Token) error
}