Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions js/packages/core/src/types/result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export enum IDKitErrorCodes {
TimestampTooFarInFuture = "timestamp_too_far_in_future",
InvalidTimestamp = "invalid_timestamp",
RpSignatureExpired = "rp_signature_expired",
IdentityAttributesNotMatched = "identity_attributes_not_matched",
GenericError = "generic_error",
// Client-side errors
InvalidRpIdFormat = "invalid_rp_id_format",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ enum class IDKitErrorCode(val rawValue: String) {
TIMESTAMP_TOO_FAR_IN_FUTURE("timestamp_too_far_in_future"),
INVALID_TIMESTAMP("invalid_timestamp"),
RP_SIGNATURE_EXPIRED("rp_signature_expired"),
IDENTITY_ATTRIBUTES_NOT_MATCHED("identity_attributes_not_matched"),
GENERIC_ERROR("generic_error"),
TIMEOUT("timeout"),
CANCELLED("cancelled");
Expand Down Expand Up @@ -91,6 +92,7 @@ enum class IDKitErrorCode(val rawValue: String) {
AppError.TIMESTAMP_TOO_FAR_IN_FUTURE -> TIMESTAMP_TOO_FAR_IN_FUTURE
AppError.INVALID_TIMESTAMP -> INVALID_TIMESTAMP
AppError.RP_SIGNATURE_EXPIRED -> RP_SIGNATURE_EXPIRED
AppError.IDENTITY_ATTRIBUTES_NOT_MATCHED -> IDENTITY_ATTRIBUTES_NOT_MATCHED
AppError.GENERIC_ERROR -> GENERIC_ERROR
}
}
Expand Down
5 changes: 5 additions & 0 deletions rust/core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ pub enum AppError {
#[error("RP signature expired")]
RpSignatureExpired,

/// Identity attributes did not match the required values
#[error("Identity attributes not matched")]
IdentityAttributesNotMatched,

/// Generic error
#[error("An error occurred")]
#[serde(other)]
Expand Down Expand Up @@ -187,6 +191,7 @@ impl AppError {
"timestamp_too_far_in_future" => Self::TimestampTooFarInFuture,
"invalid_timestamp" => Self::InvalidTimestamp,
"rp_signature_expired" => Self::RpSignatureExpired,
"identity_attributes_not_matched" => Self::IdentityAttributesNotMatched,
_ => Self::GenericError,
}
}
Expand Down
1 change: 1 addition & 0 deletions rust/core/src/wasm_bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1447,6 +1447,7 @@ export type IDKitErrorCode =
| "timestamp_too_far_in_future"
| "invalid_timestamp"
| "rp_signature_expired"
| "identity_attributes_not_matched"
| "generic_error";

/** Status returned from pollForStatus() */
Expand Down
3 changes: 3 additions & 0 deletions swift/Sources/IDKit/IDKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public enum IDKitErrorCode: String, Equatable {
case timestampTooFarInFuture = "timestamp_too_far_in_future"
case invalidTimestamp = "invalid_timestamp"
case rpSignatureExpired = "rp_signature_expired"
case identityAttributesNotMatched = "identity_attributes_not_matched"
case genericError = "generic_error"
case timeout = "timeout"
case cancelled = "cancelled"
Expand Down Expand Up @@ -174,6 +175,8 @@ public enum IDKitErrorCode: String, Equatable {
.invalidTimestamp
case .rpSignatureExpired:
.rpSignatureExpired
case .identityAttributesNotMatched:
.identityAttributesNotMatched
case .genericError:
.genericError
}
Expand Down
Loading