Add oauth pass-thru option for datasources

This commit is contained in:
Sean Lafferty
2019-02-01 19:40:57 -05:00
parent 9e33f8b7c4
commit 5a59cdf0ef
12 changed files with 312 additions and 7 deletions

View File

@ -2,17 +2,24 @@ package models
import (
"time"
"golang.org/x/oauth2"
)
type UserAuth struct {
Id int64
UserId int64
AuthModule string
AuthId string
Created time.Time
Id int64
UserId int64
AuthModule string
AuthId string
Created time.Time
OAuthAccessToken string
OAuthRefreshToken string
OAuthTokenType string
OAuthExpiry time.Time
}
type ExternalUserInfo struct {
OAuthToken *oauth2.Token
AuthModule string
AuthId string
UserId int64
@ -39,6 +46,14 @@ type SetAuthInfoCommand struct {
AuthModule string
AuthId string
UserId int64
OAuthToken *oauth2.Token
}
type UpdateAuthInfoCommand struct {
AuthModule string
AuthId string
UserId int64
OAuthToken *oauth2.Token
}
type DeleteAuthInfoCommand struct {
@ -67,6 +82,7 @@ type GetUserByAuthInfoQuery struct {
}
type GetAuthInfoQuery struct {
UserId int64
AuthModule string
AuthId string