Skip to content

Add RSA Key Converters #6494

Closed
Closed
@jzheaux

Description

@jzheaux

Spring Security supports supplying an RSA public key in its OAuth 2.0 APIs.

Local keys, though, are often distributed in files or as a PEM-encoded configuration property. It would be nice to have some support for converting an encoded RSA key into the appropriate JCA instance, e.g. RSAPublicKey.

One way to do this would be by using the Converter interface:

public class RSAPublicKeyConverter implements Converter<String, RSAPublicKey> {
    public RSAPublicKey converter(String value) {
        // ...
    }
}

Which then users could use directly or could be registered with a ConversionService.

Metadata

Metadata

Assignees

Labels

in: cryptoAn issue in spring-security-cryptotype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions