UNPKG

@sphereon/wellknown-dids-client

Version:

Well-known DID client allows to create and verify DID Domain configuration resources

49 lines (48 loc) 4.69 kB
declare enum WDCErrors { CANT_SUPPLY_BOTH_CONFIGURATION_AND_ORIGIN = "Cannot supply both a configuration and an origin. Only one should be supplied at the same time.", JWT_HEADER_CONTAINS_ADDITIONAL_PROPS = "JWT header contains additional properties", JWT_PAYLOAD_CONTAINS_ADDITIONAL_PROPS = "JWT payload contains additional properties", MUST_SUPPLY_VERIFY_SIGNATURE_CALLBACK = "verifySignatureCallback needs to be supplied via parameter or config", MUST_SUPPLY_ISSUE_CALLBACK = "issueCallback needs to be supplied via parameter or config", ISSUANCE_ORIGIN_DOES_NOT_MATCH_PROVIDED_ORIGIN = "One or more issuances have an origin that does not match the provided origin", NO_CREDENTIALS_FOUND_FOR_DID = "No credentials found for DID: ", NO_DID_CONFIGURATION_RESOURCE_OR_ORIGIN_SUPPLIED = "No did configuration resource or origin supplied . Supply a configuration or an secure well-known location", ORIGIN_NOT_SECURE = "origin is not secure", ORIGIN_NOT_VALID = "origin is not a valid origin", PROPERTY_ALG_NOT_PRESENT_IN_JWT_HEADER = "Property alg is not present in JWT header", PROPERTY_CONTEXT_NOT_PRESENT = "Property @context is not present", PROPERTY_CREDENTIAL_SUBJECT_ID_NOT_PRESENT_IN_CREDENTIAL = "Property credentialSubject.id is not present within the credential", PROPERTY_CREDENTIAL_SUBJECT_ID_NOT_MATCH_ISSUER = "Property credentialSubject.id does not match issuer property", PROPERTY_CREDENTIAL_SUBJECT_ID_NOT_VALID_DID = "Property credentialSubject.id is not a valid did url", PROPERTY_CREDENTIAL_SUBJECT_ORIGIN_NOT_PRESENT_IN_CREDENTIAL = "Property credentialSubject.origin is not present within the credential", PROPERTY_CREDENTIAL_SUBJECT_ORIGIN_NOT_VALID = "Property credentialSubject.origin is not a valid origin", PROPERTY_CREDENTIAL_SUBJECT_NOT_PRESENT_IN_CREDENTIAL = "Property credentialSubject is not present within the credential", PROPERTY_EXPIRATION_DATE_NOT_PRESENT_IN_CREDENTIAL = "Property expirationDate is not present within the credential", PROPERTY_EXPIRATION_DATE_NOT_VALID = "Property expirationDate is not a valid date", PROPERTY_ID_NOT_PRESENT_IN_SERVICE = "Property id is not present in the service", PROPERTY_ID_NOT_VALID_DID_URL = "Property id is not a valid did url", PROPERTY_ISS_NOT_PRESENT_IN_JWT_PAYLOAD = "Property iss is not present in JWT payload", PROPERTY_ISS_NOT_MATCH_CREDENTIAL_SUBJECT_ID_IN_JWT_PAYLOAD = "Property iss does not match credentialSubject id in JWT payload", PROPERTY_ISSUANCE_DATE_NOT_PRESENT_IN_CREDENTIAL = "Property issuanceDate is not present within the credential", PROPERTY_ISSUANCE_DATE_NOT_VALID = "Property issuanceDate is not a valid date", PROPERTY_KID_NOT_PRESENT_IN_JWT_HEADER = "Property kid is not present in JWT header", PROPERTY_LINKED_DIDS_DOES_NOT_CONTAIN_ANY_DOMAIN_LINK_CREDENTIALS = "Property linked_dids does not contain any domain linkage credentials", PROPERTY_LINKED_DIDS_NOT_PRESENT = "Property linked_dids is not present", PROPERTY_ORIGIN_CONTAIN_INVALID_ORIGIN = "Property origins contains an invalid origins", PROPERTY_ORIGIN_NOT_CONTAIN_ANY_ORIGIN = "Property origins does not contain any origins", PROPERTY_ORIGIN_NOT_SECURE = "Property origin is not secure", PROPERTY_SERVICE_ENDPOINT_NOT_CONTAIN_ORIGIN = "Property serviceEndpoint does not contain an origins field", PROPERTY_SERVICE_ENDPOINT_NOT_CONTAIN_VALID_ORIGIN = "Property serviceEndpoint does not contain a valid origin", PROPERTY_SERVICE_ENDPOINT_NOT_PRESENT_IN_SERVICE = "Property serviceEndpoint is not present in the service", PROPERTY_SERVICE_NOT_CONTAIN_ANY_SERVICE_WITH_TYPE = "Property service does not contain any services with type: ", PROPERTY_SERVICE_NOT_PRESENT = "Property service is not present in the provided DID document", PROPERTY_SUB_NOT_MATCH_CREDENTIAL_SUBJECT_ID_IN_JWT_PAYLOAD = "Property sub does not match credentialSubject id in JWT payload", PROPERTY_SUB_NOT_PRESENT_IN_JWT_PAYLOAD = "Property sub is not present in JWT payload", PROPERTY_TYPE_NOT_CONTAIN_VALID_LINKED_DOMAIN = "Property type does not contain a valid value of LinkedDomains", PROPERTY_TYPE_NOT_PRESENT_IN_SERVICE = "Property type is not present in the service", PROPERTY_VC_NOT_PRESENT_IN_JWT_PAYLOAD = "Property vc is not present in JWT payload", RESOURCE_CONTAINS_ADDITIONAL_PROPS = "Resource contains additional properties", SIGNATURE_IS_INVALID = "Signature is invalid", UNABLE_TO_RETRIEVE_DID_CONFIG_RESOURCE_FROM = "Unable to retrieve did configuration resource from " } export default WDCErrors;