diff options
| author | Max Resnick <max@ofmax.li> | 2020-11-08 11:45:16 -0800 |
|---|---|---|
| committer | Max Resnick <max@ofmax.li> | 2021-01-01 10:50:14 -0800 |
| commit | a397341ad471cc761f7fb930d77e53cf7eb40a2a (patch) | |
| tree | 76fb8318269569687fdd30467dc61ecba3499d09 /internal/auth/repo.go | |
| parent | 689a57ec4a444f8233fe2e5ec7ceb0903218218d (diff) | |
| download | iserv-a397341ad471cc761f7fb930d77e53cf7eb40a2a.tar.gz | |
adds casbin and accounts
Diffstat (limited to '')
| -rw-r--r-- | internal/auth/repo.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/internal/auth/repo.go b/internal/auth/repo.go index f404c94..9a0420e 100644 --- a/internal/auth/repo.go +++ b/internal/auth/repo.go @@ -1,8 +1,15 @@ package auth +import ( + "git.ofmax.li/iserv/internal/goog" + "golang.org/x/oauth2" +) + // Repo storage interface type Repo interface { - IsAuthorized(gp *GoogleAuthProfile) (bool, error) - LookUpAuthProfileID(gp *GoogleAuthProfile) (string, error) - SaveAuthProfile(ap *Profile) error + IsAuthorized(gp *goog.GoogleProfile) (bool, error) + LookUpAuthProfileID(gp *goog.GoogleProfile) (string, error) + SaveAuthProfile(email string, ap *Profile) error + CheckProfileID(id string) (bool, error) + GetProfileToken(id string) (*oauth2.Token, error) } |