Class SecretJwksKeyWriterServiceFactory
- java.lang.Object
-
- net.officefloor.web.jwt.authority.jwks.writer.SecretJwksKeyWriterServiceFactory
-
- All Implemented Interfaces:
ServiceFactory<JwksKeyWriter<? extends java.security.Key>>
,JwksKeyWriter<javax.crypto.spec.SecretKeySpec>
,JwksKeyWriterServiceFactory
public class SecretJwksKeyWriterServiceFactory extends java.lang.Object implements JwksKeyWriterServiceFactory, JwksKeyWriter<javax.crypto.spec.SecretKeySpec>
SecretKeySpec
JwksKeyWriterServiceFactory
.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description SecretJwksKeyWriterServiceFactory()
-
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<javax.crypto.spec.SecretKeySpec>
createService(ServiceContext context)
Creates the service.void
writeKey(JwksKeyWriterContext<javax.crypto.spec.SecretKeySpec> context)
Writes theKey
asObjectNode
.
-
-
-
Method Detail
-
createService
public JwksKeyWriter<javax.crypto.spec.SecretKeySpec> 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<javax.crypto.spec.SecretKeySpec>
- Parameters:
key
-Key
.- Returns:
true
if able to write theKey
.
-
writeKey
public void writeKey(JwksKeyWriterContext<javax.crypto.spec.SecretKeySpec> context) throws java.lang.Exception
Description copied from interface:JwksKeyWriter
Writes theKey
asObjectNode
.- Specified by:
writeKey
in interfaceJwksKeyWriter<javax.crypto.spec.SecretKeySpec>
- Parameters:
context
-JwksKeyWriterContext
.- Throws:
java.lang.Exception
- If fails to write theKey
.
-
-