mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-08 11:57:51 +00:00
remove settings
This commit is contained in:
parent
b5c87e0f18
commit
3b257fe3cb
1 changed files with 0 additions and 23 deletions
23
auth/auth.go
23
auth/auth.go
|
|
@ -7,15 +7,11 @@ import (
|
|||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/golang-jwt/jwt"
|
||||
"github.com/gorilla/securecookie"
|
||||
"github.com/molecula/featurebase/v2/logger"
|
||||
"github.com/pkg/errors"
|
||||
"golang.org/x/oauth2"
|
||||
"golang.org/x/oauth2/microsoft"
|
||||
)
|
||||
|
||||
type Auth struct {
|
||||
|
|
@ -41,25 +37,6 @@ type Auth struct {
|
|||
ScopeURL string `toml:"scope-url"`
|
||||
}
|
||||
|
||||
var (
|
||||
log = logger.NewStandardLogger(os.Stderr)
|
||||
cookieName = "molecula-session"
|
||||
refreshWithin = time.Second * time.Duration(15)
|
||||
hashKey = securecookie.GenerateRandomKey(32)
|
||||
blockKey = securecookie.GenerateRandomKey(32)
|
||||
secure = securecookie.New(hashKey, blockKey)
|
||||
tenantID = "4a137d66-d161-4ae4-b1e6-07e9920874b8"
|
||||
groupEndpoint = "https://graph.microsoft.com/v1.0/me/transitiveMemberOf/microsoft.graph.group?$count=true"
|
||||
OauthConfig = &oauth2.Config{
|
||||
// TODO: MAKE REDIRECT URL DYNAMIC
|
||||
RedirectURL: "http://localhost:10101/redirect",
|
||||
ClientID: "e9088663-eb08-41d7-8f65-efb5f54bbb71",
|
||||
ClientSecret: "***REMOVED***",
|
||||
Scopes: []string{"https://graph.microsoft.com/.default", "offline_access"},
|
||||
Endpoint: microsoft.AzureADEndpoint(tenantID),
|
||||
}
|
||||
)
|
||||
|
||||
type CookieValue struct {
|
||||
UserID string
|
||||
UserName string
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue