Skip to content

Commit 2d3ad7c

Browse files
authored
Allow using local keys (#112)
1 parent 6712f85 commit 2d3ad7c

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

cmd/log.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ func LogKey(name string, key interface{}) {
383383
pterm.Error.Println(err)
384384
}
385385

386-
pterm.FgGray.Printfln(p.String())
386+
pterm.FgGray.Printfln("%s", p.String())
387387
case *rsa.PrivateKey:
388388
p := bytes.Buffer{}
389389

@@ -394,7 +394,7 @@ func LogKey(name string, key interface{}) {
394394
pterm.Error.Println(err)
395395
}
396396

397-
pterm.FgGray.Printfln(p.String())
397+
pterm.FgGray.Printfln("%s", p.String())
398398
case *ecdsa.PublicKey:
399399
b, err := x509.MarshalPKIXPublicKey(key)
400400

@@ -411,7 +411,7 @@ func LogKey(name string, key interface{}) {
411411
pterm.Error.Println(err)
412412
}
413413

414-
pterm.FgGray.Printfln(p.String())
414+
pterm.FgGray.Printfln("%s", p.String())
415415
case *ecdsa.PrivateKey:
416416
b, err := x509.MarshalECPrivateKey(key)
417417

@@ -428,7 +428,7 @@ func LogKey(name string, key interface{}) {
428428
pterm.Error.Println(err)
429429
}
430430

431-
pterm.FgGray.Printfln(p.String())
431+
pterm.FgGray.Printfln("%s", p.String())
432432
case []byte:
433433
pterm.FgGray.Println(string(key))
434434
case string:

internal/oauth2/oauth2.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,20 @@ type ClientConfig struct {
7272
Password string
7373
RefreshToken string
7474
Assertion string `validate:"omitempty,json"`
75-
SigningKey string `validate:"omitempty,uri"`
76-
EncryptionKey string `validate:"omitempty,uri"`
75+
SigningKey string `validate:"omitempty,uri|file"`
76+
EncryptionKey string `validate:"omitempty,uri|file"`
7777
SubjectToken string
7878
SubjectTokenType string `validate:"omitempty,oneof=urn:ietf:params:oauth:token-type:access_token"`
7979
ActorToken string
8080
ActorTokenType string `validate:"omitempty,oneof=urn:ietf:params:oauth:token-type:access_token"`
8181
IDTokenHint string
8282
LoginHint string
8383
IDPHint string
84-
TLSCert string `validate:"omitempty,uri"`
85-
TLSKey string `validate:"omitempty,uri"`
86-
TLSRootCA string `validate:"omitempty,uri"`
87-
CallbackTLSCert string `validate:"omitempty,uri"`
88-
CallbackTLSKey string `validate:"omitempty,uri"`
84+
TLSCert string `validate:"omitempty,uri|file"`
85+
TLSKey string `validate:"omitempty,uri|file"`
86+
TLSRootCA string `validate:"omitempty,uri|file"`
87+
CallbackTLSCert string `validate:"omitempty,uri|file"`
88+
CallbackTLSKey string `validate:"omitempty,uri|file"`
8989
HTTPTimeout time.Duration
9090
BrowserTimeout time.Duration
9191
DPoP bool

0 commit comments

Comments
 (0)