Interface InternalSecurityClient
-
- All Superinterfaces:
java.lang.AutoCloseable
,BasicClient
,MockOrRestClient
,VitamAutoCloseable
- All Known Implementing Classes:
InternalSecurityClientRest
public interface InternalSecurityClient extends BasicClient
InternalSecurityClient Interface
-
-
Field Summary
-
Fields inherited from interface fr.gouv.vitam.common.client.BasicClient
STATUS_URL
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
checkIdentityExpiration()
void
checkPersonalCertificate(byte[] certificate, java.lang.String permission)
Check certificate with a permissionvoid
checkPersonalCertificateExpiration()
boolean
contextIsUsed(java.lang.String contextId)
Check if a context is used in certificatesjava.util.Optional<IdentityModel>
findIdentity(byte[] certificate)
Find IdentityIsPersonalCertificateRequiredModel
isPersonalCertificateRequiredByPermission(java.lang.String permission)
Check if a personal certificate is required for this permission-
Methods inherited from interface fr.gouv.vitam.common.client.MockOrRestClient
checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
-
-
-
-
Method Detail
-
findIdentity
java.util.Optional<IdentityModel> findIdentity(byte[] certificate) throws VitamClientInternalException, InternalSecurityException
Find Identity- Parameters:
certificate
-- Returns:
- an Optional describing the IdentityModel, otherwise return an empty Optional.
- Throws:
VitamClientInternalException
- in case of client exceptionInternalSecurityException
- in case of internal security exception
-
isPersonalCertificateRequiredByPermission
IsPersonalCertificateRequiredModel isPersonalCertificateRequiredByPermission(java.lang.String permission) throws VitamClientInternalException, InternalSecurityException
Check if a personal certificate is required for this permission- Parameters:
permission
- the permission to be checkd- Returns:
- IsPersonalCertificateRequiredModel
- Throws:
VitamClientInternalException
InternalSecurityException
-
checkPersonalCertificate
void checkPersonalCertificate(byte[] certificate, java.lang.String permission) throws VitamClientInternalException, InternalSecurityException
Check certificate with a permission- Parameters:
certificate
- the certificate to be checkedpermission
- the permission to be checked- Throws:
VitamClientInternalException
InternalSecurityException
-
checkIdentityExpiration
void checkIdentityExpiration() throws VitamClientInternalException, InternalSecurityException
-
checkPersonalCertificateExpiration
void checkPersonalCertificateExpiration() throws VitamClientInternalException, InternalSecurityException
-
contextIsUsed
boolean contextIsUsed(java.lang.String contextId) throws VitamClientInternalException, InternalSecurityException
Check if a context is used in certificates- Parameters:
contextId
-- Returns:
- true if the context is used by an identity.
- Throws:
VitamClientInternalException
InternalSecurityException
-
-