Class IdentityService

    • Constructor Detail

    • Method Detail

      • linkContextToIdentity

        public java.util.Optional<IdentityModel> linkContextToIdentity​(IdentityInsertModel identityInsertModel)
                                                                throws java.security.cert.CertificateException,
                                                                       InvalidParseOperationException
        Parameters:
        identityInsertModel - Identity certificate to insert
        Returns:
        the identity model if exists
        Throws:
        java.security.cert.CertificateException - thrown if certificate parse fail
        InvalidParseOperationException - thrown retrieving identity fail
      • findIdentity

        public java.util.Optional<IdentityModel> findIdentity​(byte[] certificate)
                                                       throws java.security.cert.CertificateException,
                                                              InvalidParseOperationException
        Parameters:
        certificate - the certificate to find
        Returns:
        the identity model if exists
        Throws:
        java.security.cert.CertificateException - thrown if certificate parse fail
        InvalidParseOperationException - thrown retrieving certificate fail
      • contextIsUsed

        public boolean contextIsUsed​(java.lang.String contextId)
        Parameters:
        contextId - the context Id
        Returns:
        true if the context is used by an identity