-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removes
hmacEnabled
property on MagicbellClient, in favour of just …
…using `hmac` property on `connectUser`
- Loading branch information
Showing
6 changed files
with
4 additions
and
15 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 |
---|---|---|
|
@@ -116,7 +116,6 @@ You can provide additional options when initializing a client: | |
```swift | ||
let magicbell = MagicBellClient( | ||
apiKey: "[MAGICBELL_API_KEY]" | ||
enableHMAC: true, | ||
logLevel: .debug | ||
) | ||
``` | ||
|
@@ -125,7 +124,6 @@ let magicbell = MagicBellClient( | |
| ------------ | ------------- | -------------------------------------------------------------------------------------------- | | ||
| `apiKey` | - | Your MagicBell's API key | | ||
| `apiSecret` | `nil` | Your MagicBell's API secret | | ||
| `enableHMAC` | `false` | Set it to `true` if you want HMAC enabled. Note the `apiSecret` is required if set to `true` | | ||
| `logLevel` | `.none` | Set it to `.debug` to enable logs | | ||
|
||
Though the API key is meant to be published, you should not distribute the API secret. Rather, enable HMAC for your | ||
|
@@ -169,7 +167,7 @@ let user = magicbell.connectUser(externalId: "001") | |
let user = magicbell.connectUser(email: "[email protected]", externalId: "001") | ||
``` | ||
|
||
Each variant of `connectUser` supports an optional `hmac` parameter that is required if `enableHMAC` is enabled when initiating the `MagicBellClient`. | ||
Each variant of `connectUser` supports an optional `hmac` parameter that should be send when HMAC Security was enabled for the project. | ||
|
||
You can connect as [many users as you need](#multi-user-support). | ||
|
||
|
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 |
---|---|---|
|
@@ -16,5 +16,4 @@ import Foundation | |
struct Environment { | ||
let apiKey: String | ||
let baseUrl: URL | ||
let isHMACEnabled: Bool | ||
} |
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