Package fr.gouv.vitam.security.internal.client

# Interface InternalSecurityClient

All Superinterfaces:
  `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

  Modifier and Type
  Method
  Description
  `void`
  `checkIdentityExpiration()`
  `void`
  `checkPersonalCertificate(byte[] certificate, String permission)`
  Check certificate with a permission
  `void`
  `checkPersonalCertificateExpiration()`
  `boolean`
  `contextIsUsed(String contextId)`
  Check if a context is used in certificates
  `Optional<IdentityModel>`
  `findIdentity(byte[] certificate)`
  Find Identity
  `IsPersonalCertificateRequiredModel`
  `isPersonalCertificateRequiredByPermission(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 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 exception
      `InternalSecurityException` - 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 checked
      `permission` - the permission to be checked
    Throws:
      `VitamClientInternalException`
      `InternalSecurityException`

  - ### checkIdentityExpiration

    void checkIdentityExpiration() throws VitamClientInternalException, InternalSecurityException
    Throws:
      `VitamClientInternalException`
      `InternalSecurityException`

  - ### checkPersonalCertificateExpiration

    void checkPersonalCertificateExpiration() throws VitamClientInternalException, InternalSecurityException
    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`