let deprecated method implement replacement

This commit is contained in:
Livio Amstutz 2022-04-11 08:17:54 +02:00
parent dda0628528
commit e5528e7390
No known key found for this signature in database
GPG key ID: 26BB1C2FA5952CF0

View file

@ -237,14 +237,7 @@ func WithVerifierOpts(opts ...VerifierOption) Option {
// //
//deprecated: use WithJWTProfile(SignerFromKeyPath(path)) instead //deprecated: use WithJWTProfile(SignerFromKeyPath(path)) instead
func WithClientKey(path string) Option { func WithClientKey(path string) Option {
return func(rp *relyingParty) error { return WithJWTProfile(SignerFromKeyPath(path))
config, err := client.ConfigFromKeyFile(path)
if err != nil {
return err
}
rp.signer, err = client.NewSignerFromPrivateKeyByte([]byte(config.Key), config.KeyID)
return err
}
} }
// WithJWTProfile creates a signer used for the JWT Profile Client Authentication on the token endpoint // WithJWTProfile creates a signer used for the JWT Profile Client Authentication on the token endpoint