-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #793 from Iterable/feature/JWTImrovements
[MOB- 9274]- Merging JWT feature into master
- Loading branch information
Showing
19 changed files
with
368 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// AuthFailure.swift | ||
// swift-sdk | ||
// | ||
// Created by HARDIK MASHRU on 21/05/24. | ||
// Copyright © 2024 Iterable. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
@objc public class AuthFailure: NSObject { | ||
|
||
/// userId or email of the signed-in user | ||
public let userKey: String? | ||
|
||
/// the authToken which caused the failure | ||
public let failedAuthToken: String? | ||
|
||
/// the timestamp of the failed request | ||
public let failedRequestTime: Int | ||
|
||
/// indicates a reason for failure | ||
public let failureReason: AuthFailureReason | ||
|
||
public init(userKey: String?, | ||
failedAuthToken: String?, | ||
failedRequestTime: Int, | ||
failureReason: AuthFailureReason) { | ||
self.userKey = userKey | ||
self.failedAuthToken = failedAuthToken | ||
self.failedRequestTime = failedRequestTime | ||
self.failureReason = failureReason | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// AuthFailureReason.swift | ||
// swift-sdk | ||
// | ||
// Created by HARDIK MASHRU on 21/05/24. | ||
// Copyright © 2024 Iterable. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
@objc public enum AuthFailureReason: Int { | ||
case authTokenExpired | ||
case authTokenGenericError | ||
case authTokenExpirationInvalid | ||
case authTokenSignatureInvalid | ||
case authTokenFormatInvalid | ||
case authTokenInvalidated | ||
case authTokenPayloadInvalid | ||
case authTokenUserKeyInvalid | ||
case authTokenNull | ||
case authTokenGenerationError | ||
case authTokenMissing | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.