Class IdentityService
- java.lang.Object
-
- fr.gouv.vitam.security.internal.rest.service.IdentityService
-
public class IdentityService extends java.lang.Object
manage certificate.
-
-
Constructor Summary
Constructors Constructor Description IdentityService(IdentityRepository identityRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contextIsUsed(java.lang.String contextId)
void
createIdentity(IdentityInsertModel identityInsertModel)
create certificatejava.util.Optional<IdentityModel>
findIdentity(byte[] certificate)
java.util.Optional<IdentityModel>
linkContextToIdentity(IdentityInsertModel identityInsertModel)
-
-
-
Constructor Detail
-
IdentityService
public IdentityService(IdentityRepository identityRepository)
-
-
Method Detail
-
createIdentity
public void createIdentity(IdentityInsertModel identityInsertModel) throws java.security.cert.CertificateException, InvalidParseOperationException
create certificate- Parameters:
identityInsertModel
-- Throws:
java.security.cert.CertificateException
InvalidParseOperationException
-
linkContextToIdentity
public java.util.Optional<IdentityModel> linkContextToIdentity(IdentityInsertModel identityInsertModel) throws java.security.cert.CertificateException, InvalidParseOperationException
- Parameters:
identityInsertModel
-- Returns:
- Throws:
java.security.cert.CertificateException
InvalidParseOperationException
-
findIdentity
public java.util.Optional<IdentityModel> findIdentity(byte[] certificate) throws java.security.cert.CertificateException, InvalidParseOperationException
- Parameters:
certificate
-- Returns:
- Throws:
java.security.cert.CertificateException
InvalidParseOperationException
-
contextIsUsed
public boolean contextIsUsed(java.lang.String contextId)
- Parameters:
contextId
-- Returns:
- true if the context is used by an identity
-
-