UNPKG

@sphereon/oid4vci-common

Version:

OpenID 4 Verifiable Credential Issuance Common Types

41 lines 4.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WRONG_METADATA_FORMAT = exports.ACCESS_TOKEN_ISSUER_REQUIRED_ERROR = exports.NONCE_STATE_MANAGER_REQUIRED_ERROR = exports.STATE_MANAGER_REQUIRED_ERROR = exports.JWT_SIGNER_CALLBACK_REQUIRED_ERROR = exports.EXPIRED_PRE_AUTHORIZED_CODE = exports.INVALID_PRE_AUTHORIZED_CODE = exports.PIN_NOT_MATCH_ERROR = exports.PIN_VALIDATION_ERROR = exports.USER_PIN_NOT_REQUIRED_ERROR = exports.USER_PIN_TX_CODE_SPEC_ERROR = exports.USER_PIN_REQUIRED_ERROR = exports.PRE_AUTHORIZED_CODE_REQUIRED_ERROR = exports.UNSUPPORTED_GRANT_TYPE_ERROR = exports.CREDENTIAL_MISSING_ERROR = exports.STATE_MISSING_ERROR = exports.GRANTS_MUST_NOT_BE_UNDEFINED = exports.ISS_MUST_BE_CLIENT_ID = exports.ISS_PRESENT_IN_PRE_AUTHORIZED_CODE_CONTEXT = exports.NO_ISS_IN_AUTHORIZATION_CODE_CONTEXT = exports.UNKNOWN_CLIENT_ERROR = exports.ISSUER_CONFIG_ERROR = exports.JWT_VERIFY_CONFIG_ERROR = exports.NONCE_ERROR = exports.IAT_ERROR = exports.AUD_ERROR = exports.DID_NO_DIDDOC_ERROR = exports.KID_DID_NO_DID_ERROR = exports.KID_JWK_X5C_ERROR = exports.ALG_ERROR = exports.TYP_ERROR = exports.NO_JWT_PROVIDED = exports.PROOF_CANT_BE_CONSTRUCTED = exports.JWS_NOT_VALID = exports.URL_NOT_VALID = exports.BAD_PARAMS = void 0; const CredentialIssuance_types_1 = require("./CredentialIssuance.types"); exports.BAD_PARAMS = 'Wrong parameters provided'; exports.URL_NOT_VALID = 'Request url is not valid'; exports.JWS_NOT_VALID = 'JWS is not valid'; exports.PROOF_CANT_BE_CONSTRUCTED = "Proof can't be constructed."; exports.NO_JWT_PROVIDED = 'No JWT provided'; exports.TYP_ERROR = 'Typ must be "openid4vci-proof+jwt"'; exports.ALG_ERROR = `Algorithm is a required field, you are free to use the signing algorithm of your choice or one of the following: ${Object.keys(CredentialIssuance_types_1.Alg).join(', ')}`; exports.KID_JWK_X5C_ERROR = 'Only one must be present: x5c should not present when kid and/or jwk is already present'; exports.KID_DID_NO_DID_ERROR = 'A DID value needs to be returned when kid is present'; exports.DID_NO_DIDDOC_ERROR = 'A DID Document needs to be resolved when a DID is encountered'; exports.AUD_ERROR = 'aud must be the URL of the credential issuer'; exports.IAT_ERROR = 'iat must be the time at which the proof was issued'; exports.NONCE_ERROR = 'nonce must be c_nonce provided by the credential issuer'; exports.JWT_VERIFY_CONFIG_ERROR = 'JWT verify callback not configured correctly.'; exports.ISSUER_CONFIG_ERROR = 'Issuer not configured correctly.'; exports.UNKNOWN_CLIENT_ERROR = 'The client is not known by the issuer'; exports.NO_ISS_IN_AUTHORIZATION_CODE_CONTEXT = 'iss missing in authorization-code context'; exports.ISS_PRESENT_IN_PRE_AUTHORIZED_CODE_CONTEXT = 'iss should be omitted in pre-authorized-code context'; exports.ISS_MUST_BE_CLIENT_ID = 'iss must be the client id'; exports.GRANTS_MUST_NOT_BE_UNDEFINED = 'Grants must not be undefined'; exports.STATE_MISSING_ERROR = 'issuer state or pre-authorized key not found'; exports.CREDENTIAL_MISSING_ERROR = 'Credential must be present in response'; exports.UNSUPPORTED_GRANT_TYPE_ERROR = 'unsupported grant_type'; exports.PRE_AUTHORIZED_CODE_REQUIRED_ERROR = 'pre-authorized_code is required'; exports.USER_PIN_REQUIRED_ERROR = 'User pin is required'; exports.USER_PIN_TX_CODE_SPEC_ERROR = 'user_pin is mixed with tx_code, indicating a spec mismatch'; exports.USER_PIN_NOT_REQUIRED_ERROR = 'User pin is not required'; exports.PIN_VALIDATION_ERROR = 'PIN must consist the following amount of characters:'; exports.PIN_NOT_MATCH_ERROR = 'PIN is invalid'; exports.INVALID_PRE_AUTHORIZED_CODE = 'pre-authorized_code is invalid'; exports.EXPIRED_PRE_AUTHORIZED_CODE = 'pre-authorized_code is expired'; exports.JWT_SIGNER_CALLBACK_REQUIRED_ERROR = 'JWT signer callback function is required'; exports.STATE_MANAGER_REQUIRED_ERROR = 'StateManager instance is required'; exports.NONCE_STATE_MANAGER_REQUIRED_ERROR = 'NonceStateManager instance is required'; exports.ACCESS_TOKEN_ISSUER_REQUIRED_ERROR = 'access token issuer is required'; exports.WRONG_METADATA_FORMAT = 'Wrong metadata format'; //# sourceMappingURL=OpenID4VCIErrors.js.map