From c611b16763b31451a6b92d9e7a5a95393c35e4c5 Mon Sep 17 00:00:00 2001 From: Srie Teja Date: Thu, 31 Aug 2023 13:14:42 +0530 Subject: [PATCH 1/4] feat: introduce new error code for apkam enrollment expiry --- packages/at_commons/lib/src/exception/error_message.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/at_commons/lib/src/exception/error_message.dart b/packages/at_commons/lib/src/exception/error_message.dart index 5f2d6f5a..ed006b87 100644 --- a/packages/at_commons/lib/src/exception/error_message.dart +++ b/packages/at_commons/lib/src/exception/error_message.dart @@ -48,5 +48,6 @@ const Map error_description = { 'AT0024': 'Server is paused', 'AT0025': 'ApkamAuthDenied', 'AT0026': 'ApkamAuthFailed', - 'AT0027': 'ApkamAccessRevoked' + 'AT0027': 'ApkamAccessRevoked', + 'AT0028': 'ApkamEnrollmentExpired' }; From b21d690a12f74ecb38eba6c4b82570abf0904db3 Mon Sep 17 00:00:00 2001 From: Srie Teja Date: Tue, 5 Sep 2023 15:00:24 +0530 Subject: [PATCH 2/4] feat: add new enrollment status 'expired' --- packages/at_commons/lib/src/enroll/enrollment.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/at_commons/lib/src/enroll/enrollment.dart b/packages/at_commons/lib/src/enroll/enrollment.dart index bfb68f57..902b7d93 100644 --- a/packages/at_commons/lib/src/enroll/enrollment.dart +++ b/packages/at_commons/lib/src/enroll/enrollment.dart @@ -10,7 +10,7 @@ class EnrollResponse { } } -enum EnrollStatus { pending, approved, denied, revoked } +enum EnrollStatus { pending, approved, denied, revoked, expired } EnrollStatus getEnrollStatusFromString(String value) { switch (value) { @@ -22,6 +22,8 @@ EnrollStatus getEnrollStatusFromString(String value) { return EnrollStatus.pending; case 'revoked': return EnrollStatus.revoked; + case 'expired': + return EnrollStatus.expired; default: throw ArgumentError('Unknown enroll status string: $value'); } From bed9dce47f0331010749436643dea695d63bc1dc Mon Sep 17 00:00:00 2001 From: Sri Teja T <50960424+srieteja@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:17:40 +0530 Subject: [PATCH 3/4] Update CHANGELOG.md --- packages/at_commons/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/at_commons/CHANGELOG.md b/packages/at_commons/CHANGELOG.md index d37506a9..f468736a 100644 --- a/packages/at_commons/CHANGELOG.md +++ b/packages/at_commons/CHANGELOG.md @@ -1,5 +1,6 @@ ## 3.0.55 - feat: Introduce "AtThrottleLimitExceeded" exception which is thrown when enrollment request exceeds the limit +- feat: Introduce new error codes for apkam enrollments ## 3.0.54 - fix: Modify "totp" verb regex to include alpha-numeric characters - feat: Introduce "EnrollResponse" class which represents the enrollment response. From 96267920b2957bc1fb4008ab8c94051eaee3b301 Mon Sep 17 00:00:00 2001 From: Sri Teja T <50960424+srieteja@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:36:44 +0530 Subject: [PATCH 4/4] Update error_message.dart --- .../at_commons/lib/src/exception/error_message.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/at_commons/lib/src/exception/error_message.dart b/packages/at_commons/lib/src/exception/error_message.dart index 2a923f50..ae41ffd5 100644 --- a/packages/at_commons/lib/src/exception/error_message.dart +++ b/packages/at_commons/lib/src/exception/error_message.dart @@ -47,9 +47,9 @@ const Map error_description = { 'AT0022': 'Illegal arguments', 'AT0023': 'Timeout waiting for response', 'AT0024': 'Server is paused', - 'AT0025': 'ApkamAuthDenied', - 'AT0026': 'ApkamAuthFailed', - 'AT0027': 'ApkamAccessRevoked', - 'AT0028': 'Too Many Requests', - 'AT0029': 'ApkamEnrollmentExpired' + 'AT0025': 'Apkam Auth Denied', + 'AT0026': 'Apkam Auth Failed', + 'AT0027': 'Apkam Access Revoked', + 'AT0028': 'Apkam Enrollment Expired', + 'AT0029': 'Too Many Requests' };