-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstructure.go
37 lines (32 loc) · 955 Bytes
/
structure.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package main
import (
"encoding/xml"
"github.com/coreos/go-oidc/v3/oidc"
"github.com/golang-jwt/jwt/v5"
"golang.org/x/oauth2"
)
type JWTClaims struct {
Email string
jwt.RegisteredClaims
}
type OIDCConfig struct {
XMLName xml.Name `xml:"oidc"`
ClientID string `xml:"clientID"`
ClientSecret string `xml:"clientSecret"`
RedirectURL string `xml:"redirectURL"`
Scopes []string `xml:"scopes"`
Provider string `xml:"provider"`
}
type Config struct {
Username string `xml:"username"`
Password string `xml:"password"`
WiiMailDatabaseAddress string `xml:"wiiMailDatabaseAddress"`
WiiMailDatabaseName string `xml:"wiiMailDatabaseName"`
Address string `xml:"address"`
AssetsPath string `xml:"assetsPath"`
OIDCConfig OIDCConfig `xml:"oidc"`
}
type AppAuthConfig struct {
OAuth2Config *oauth2.Config
Provider *oidc.Provider
}