From a397341ad471cc761f7fb930d77e53cf7eb40a2a Mon Sep 17 00:00:00 2001 From: Max Resnick Date: Sun, 8 Nov 2020 11:45:16 -0800 Subject: adds casbin and accounts --- internal/auth/repo.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'internal/auth/repo.go') 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) } -- cgit v1.2.3