diff --git a/auth/test_settings.go b/auth/test_settings.go new file mode 100644 index 000000000..7dacc96df --- /dev/null +++ b/auth/test_settings.go @@ -0,0 +1,30 @@ +package auth + +import ( + "os" + "time" + + "github.com/gorilla/securecookie" + "github.com/molecula/featurebase/v2/logger" + "golang.org/x/oauth2" + "golang.org/x/oauth2/microsoft" +) + +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), + } +) diff --git a/install/featurebase.conf b/install/featurebase.conf index 540a410f4..df52ec2d7 100644 --- a/install/featurebase.conf +++ b/install/featurebase.conf @@ -380,4 +380,6 @@ log-path = "/var/log/molecula/featurebase.log" # authorize-url = "" # token-url = "" # group-endpoint-url = "" -# scope-url = "" \ No newline at end of file +# scope-url = "" +# hash-key = "" +# block-key = "" \ No newline at end of file