Work with go-jose to have encryption

This commit is contained in:
Bolke de Bruin 2020-08-19 11:33:26 +02:00
parent 2822dc8dd1
commit 188f077da1
7 changed files with 131 additions and 55 deletions

View file

@ -44,9 +44,10 @@ type RDGCapsConfig struct {
}
type SecurityConfig struct {
EnableOpenId bool
TokenSigningKey string
PassTokenAsPassword bool
PAATokenEncryptionKey string
PAATokenSigningKey string
UserTokenEncryptionKey string
UserTokenSigningKey string
}
type ClientConfig struct {
@ -82,7 +83,7 @@ func Load(configFile string) Configuration {
log.Fatalf("Cannot unmarshal the config file; %s", err)
}
if len(conf.Security.TokenSigningKey) < 32 {
if len(conf.Security.PAATokenSigningKey) < 32 {
log.Fatalf("Token signing key not long enough")
}