Class RsaPrivateJwksKeyWriterServiceFactory
- java.lang.Object
-
- net.officefloor.web.jwt.authority.jwks.writer.RsaPrivateJwksKeyWriterServiceFactory
-
- All Implemented Interfaces:
ServiceFactory<JwksKeyWriter<? extends java.security.Key>>
,JwksKeyWriter<java.security.interfaces.RSAPrivateCrtKey>
,JwksKeyWriterServiceFactory
public class RsaPrivateJwksKeyWriterServiceFactory extends java.lang.Object implements JwksKeyWriterServiceFactory, JwksKeyWriter<java.security.interfaces.RSAPrivateCrtKey>
RSAPrivateKey
JwksKeyWriterServiceFactory
.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description RsaPrivateJwksKeyWriterServiceFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canWriteKey(java.security.Key key)
Indicates if able to write theKey
.JwksKeyWriter<java.security.interfaces.RSAPrivateCrtKey>
createService(ServiceContext context)
Creates the service.void
writeKey(JwksKeyWriterContext<java.security.interfaces.RSAPrivateCrtKey> context)
Writes theKey
asObjectNode
.
-
-
-
Method Detail
-
createService
public JwksKeyWriter<java.security.interfaces.RSAPrivateCrtKey> createService(ServiceContext context) throws java.lang.Throwable
Description copied from interface:ServiceFactory
Creates the service.- Specified by:
createService
in interfaceServiceFactory<JwksKeyWriter<? extends java.security.Key>>
- Parameters:
context
-ServiceContext
.- Returns:
- Service.
- Throws:
java.lang.Throwable
- If fails to create the service.
-
canWriteKey
public boolean canWriteKey(java.security.Key key)
Description copied from interface:JwksKeyWriter
Indicates if able to write theKey
.- Specified by:
canWriteKey
in interfaceJwksKeyWriter<java.security.interfaces.RSAPrivateCrtKey>
- Parameters:
key
-Key
.- Returns:
true
if able to write theKey
.
-
writeKey
public void writeKey(JwksKeyWriterContext<java.security.interfaces.RSAPrivateCrtKey> context) throws java.lang.Exception
Description copied from interface:JwksKeyWriter
Writes theKey
asObjectNode
.- Specified by:
writeKey
in interfaceJwksKeyWriter<java.security.interfaces.RSAPrivateCrtKey>
- Parameters:
context
-JwksKeyWriterContext
.- Throws:
java.lang.Exception
- If fails to write theKey
.
-
-