Interface InternalSecurityClient
- All Superinterfaces:
AutoCloseable
,BasicClient
,MockOrRestClient
,VitamAutoCloseable
- All Known Implementing Classes:
InternalSecurityClientRest
InternalSecurityClient Interface
-
Field Summary
Fields inherited from interface fr.gouv.vitam.common.client.BasicClient
STATUS_URL
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
checkPersonalCertificate
(byte[] certificate, String permission) Check certificate with a permissionvoid
boolean
contextIsUsed
(String contextId) Check if a context is used in certificatesfindIdentity
(byte[] certificate) Find IdentityisPersonalCertificateRequiredByPermission
(String permission) Check if a personal certificate is required for this permissionMethods inherited from interface fr.gouv.vitam.common.client.MockOrRestClient
checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
-
Method Details
-
findIdentity
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(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, 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
-
checkPersonalCertificateExpiration
void checkPersonalCertificateExpiration() throws VitamClientInternalException, InternalSecurityException -
contextIsUsed
boolean contextIsUsed(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
-