Removed utils in favor of common utils

This commit is contained in:
David Allen 2024-02-27 19:45:06 -07:00
parent 2be7c3123f
commit 1e5982763f
No known key found for this signature in database
GPG key ID: 1D2A29322FBB6FCB
9 changed files with 51 additions and 119 deletions

View file

@ -2,11 +2,12 @@ package opaal
import (
"davidallendj/opaal/internal/oidc"
"davidallendj/opaal/internal/util"
"log"
"os"
"path/filepath"
goutil "github.com/davidallendj/go-utils/util"
"gopkg.in/yaml.v2"
)
@ -23,11 +24,12 @@ type Config struct {
DecodeIdToken bool `yaml:"decode-id-token"`
DecodeAccessToken bool `yaml:"decode-access-token"`
RunOnce bool `yaml:"run-once"`
GrantType string `yaml:"grant-type"`
}
func NewConfig() Config {
return Config{
Version: util.GetCommit(),
Version: goutil.GetCommit(),
Server: Server{
Host: "127.0.0.1",
Port: 3333,
@ -38,7 +40,7 @@ func NewConfig() Config {
RedirectUris: []string{""},
},
IdentityProvider: *oidc.NewIdentityProvider(),
State: util.RandomString(20),
State: goutil.RandomString(20),
ResponseType: "code",
Scope: []string{"openid", "profile", "email"},
ActionUrls: ActionUrls{
@ -51,6 +53,7 @@ func NewConfig() Config {
DecodeIdToken: false,
DecodeAccessToken: false,
RunOnce: true,
GrantType: "authorization_code",
}
}