Skip to content

Commit

Permalink
Merge pull request #15 from StreamAMG/release/1.1.10
Browse files Browse the repository at this point in the history
Merge release/1.1.10
  • Loading branch information
zachtom authored Feb 20, 2023
2 parents ddcfcf5 + 5628398 commit bfc4f8b
Show file tree
Hide file tree
Showing 20 changed files with 704 additions and 144 deletions.
53 changes: 50 additions & 3 deletions AuthReadme.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,13 @@ var auth = AuthenticationSDK.instance
It is required that a valid authentication URL is passed to the SDK before it is usable:

```
auth.initialiseWithURL("https:validURL.test.com/")
auth.initialiseWithURL("https:validURL.test.com")
```
The URL should be followed by a trailing front slash

It is also possible to pass other URL parameters to the SDK here:

```
auth.initialiseWithURL("https:validURL.test.com/", params:"lang=en&otherParam=otherValue")
auth.initialiseWithURL("https:validURL.test.com", params:"lang=en&otherParam=otherValue")
```

Logging In
Expand Down Expand Up @@ -142,11 +141,59 @@ auth.getKS(entryID: "0_validEntryID") { (result: Result<(SAKSResult, String), St
}
}
```
Using custom SSO
=======================
Authentication SDK supports custom SSO implementation that are correctly configured with CloudPay and are able to generate a valid use JWT token.

## Start the session with custom SSO

In order to communicate with CloudPay the app needs to start the session with the users token generated. This is an optional step and required only if you are not using cloud pay login but you want to start a user session to to log the sessions and so get CloudPay check the concurrency.


```
auth.startSession(token: tokens.idToken) { error in
if error != nil {
// Handle error
} else {
// Session sucessfully created
}
}
```
## Update user summary
The update user summary function allows a user to update their user details. Please be aware that the API cannot edit the user's email.

This function needs to be utilised after a new user is registered and every time the user wants to update the metadata.

```
auth.updateUserSummaryWithUserToken(token: tokens.idToken, firstName: "Name", lastName: "Surname") {(result: Result<UserSummaryResponse, StreamAMGError>) in
switch result {
case .success(let data):
// User data sucessfully updated.
case .failure(let error):
// Update user summary failed.
}
}
```
## Retrieve the User's Summary

Returns an account summary of the Authenticated User.

```
auth.getUserSummary(token: tokens.idToken) { (result: Result<UserSummaryResponse, StreamAMGError>) in
switch result {
case .success(let data):
// Get user data success
case .failure(let error):
// Get user data failed
}
}
```

Change Log:
===========

All notable changes to this project will be documented in this section.
### 1.1.10 - Added support to start session with custom SSO

### 1.0 - Release

Expand Down
8 changes: 8 additions & 0 deletions PlayKitReadme.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,11 @@ Toggle the visibility of the bitrate selector
.setBitrateSelector(_ isOn: Bool)
```

Toggle the visibility of the subtitles selector
``` Swift
.setSubtitlesSelector(_ isOn: Bool)
```

## Media overlays

AMG Play Kit supports the overlaying of an 'is live' badge and a logo as overlays to any media playing.
Expand Down Expand Up @@ -756,6 +761,9 @@ func bitrateChangeOccurred(list: [FlavorAsset]?) {

All notable changes to this project will be documented in this section.

### 1.1.10
- Integrated Subtitles UI

### 1.1.9
- Updated Content for subtitles section

Expand Down
15 changes: 13 additions & 2 deletions PurchasesReadme.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ It doesn't fully matter when these methods are called, but it is suggested that
func applicationDidBecomeActive(_ application: UIApplication) {
AMGPurchases.instance.startObserving()
}

func applicationWillResignActive(_ application: UIApplication) {
AMGPurchases.instance.stopObserving()
}
Expand Down Expand Up @@ -204,14 +204,25 @@ A failed purchase or receipt validation issue will result in the following metho
``` Swift
func purchaseFailed(purchase: AMGInAppPurchase, error: StreamAMGError)
```

Where 'error' is a standard StreamAMGError (see 'Core' module)

Validate a purchase
=======================

``` Swift
validatePurchase(payment: ReceiptPaymentModel?)
validatePurchase(payment: ReceiptPaymentModel?, withJWTToken: String?)
```
This method validates the purchase you just completed. This method also supports sending an optional custom JWT Token. You can make use of the custom JWT Token if you are not using the login functionality provided by the StreamAMG Authentication API.

If you are using custom token to validate the purchase, we recommend using the startSession() API provided by the StreamAMG Authentication API to log the user sessions and to get CloudPay, check the concurrency.

Change Log:
===========

All notable changes to this project will be documented in this section.
### 1.1.10 - Updated valdiatePurchase API to accept custom JWT Token

### 1.0 - Release

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ Change Log:
---------------

All notable changes to this project will be documented in this section.

### 1.1.10 - Integrated Playkit Subtitles UI, Updated AuthSDK to support custom SSO session and enabled validatePurchase method in Purchases SDK to accept custom JWT Token.

### 1.1.9 - Updated PlayKit readme for subtitles section.

### 1.1.8 - Added fix for multi threading issue.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"images" : [
{
"filename" : "subtitles.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit bfc4f8b

Please sign in to comment.