File tree Expand file tree Collapse file tree 9 files changed +27
-7
lines changed
Tests/PubNubTests/Helpers Expand file tree Collapse file tree 9 files changed +27
-7
lines changed Original file line number Diff line number Diff line change 11---
22name : swift
33scm : github.com/pubnub/swift
4- version : " 5.0.0 "
4+ version : " 5.0.1 "
55schema : 1
66changelog :
7+ - date : 2022-01-19
8+ version : 5.0.1
9+ changes :
10+ - type : bug
11+ text : " Fix issue because of which access token not updated in subscription session."
712 - date : 2022-01-12
813 version : 5.0.0
914 changes :
@@ -434,7 +439,7 @@ sdks:
434439 - distribution-type : source
435440 distribution-repository : GitHub release
436441 package-name : PubNub
437- location : https://github.com/pubnub/swift/archive/refs/tags/5.0.0 .zip
442+ location : https://github.com/pubnub/swift/archive/refs/tags/5.0.1 .zip
438443 supported-platforms :
439444 supported-operating-systems :
440445 macOS :
Original file line number Diff line number Diff line change 66 <string >demo </string >
77 <key >PubNubSubscribeKey </key >
88 <string >demo </string >
9+ <key >PubNubUuid </key >
10+ <string >demo-user </string >
911 <key >CFBundleDevelopmentRegion </key >
1012 <string >$(DEVELOPMENT_LANGUAGE) </string >
1113 <key >CFBundleExecutable </key >
Original file line number Diff line number Diff line change 25062506 "$(inherited)",
25072507 "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx",
25082508 );
2509- MARKETING_VERSION = 5.0.0 ;
2509+ MARKETING_VERSION = 5.0.1 ;
25102510 OTHER_CFLAGS = "$(inherited)";
25112511 OTHER_LDFLAGS = "$(inherited)";
25122512 OTHER_SWIFT_FLAGS = "$(inherited)";
25392539 "$(inherited)",
25402540 "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx",
25412541 );
2542- MARKETING_VERSION = 5.0.0 ;
2542+ MARKETING_VERSION = 5.0.1 ;
25432543 OTHER_CFLAGS = "$(inherited)";
25442544 OTHER_LDFLAGS = "$(inherited)";
25452545 OTHER_SWIFT_FLAGS = "$(inherited)";
Original file line number Diff line number Diff line change 11Pod ::Spec . new do |s |
22 s . name = 'PubNubSwift'
3- s . version = '5.0.0 '
3+ s . version = '5.0.1 '
44 s . homepage = 'https://github.com/pubnub/swift'
55 s . documentation_url = 'https://www.pubnub.com/docs/swift-native/pubnub-swift-sdk'
66 s . authors = { 'PubNub, Inc.' => '[email protected] ' }
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ public struct Constant {
6262 } ( )
6363
6464 static let pubnubSwiftSDKVersion : String = {
65- " 5.0.0 "
65+ " 5.0.1 "
6666 } ( )
6767
6868 static let appBundleId : String = {
Original file line number Diff line number Diff line change @@ -2041,6 +2041,7 @@ extension PubNub {
20412041 /// - Parameter token: The token to add to the Token Management System.
20422042 public mutating func set( token: String ) {
20432043 configuration. authToken = token
2044+ subscription. configuration. authToken = token
20442045 }
20452046}
20462047
Original file line number Diff line number Diff line change @@ -113,6 +113,8 @@ public protocol SubscriptionConfiguration: RouterConfiguration {
113113 var requestMessageCountThreshold : UInt { get }
114114 /// PSV2 feature to subscribe with a custom filter expression.
115115 var filterExpression : String ? { get }
116+ /// If Access Manager (PAM) is enabled, client will use `authToken` instead of `authKey` on all requests
117+ override var authToken : String ? { get set }
116118}
117119
118120extension SubscriptionConfiguration {
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public class SubscriptionSession {
3333
3434 public let uuid = UUID ( )
3535 let longPollingSession : SessionReplaceable
36- let configuration : SubscriptionConfiguration
36+ internal ( set ) var configuration : SubscriptionConfiguration
3737 let sessionStream : SessionListener
3838
3939 /// PSV2 feature to subscribe with a custom filter expression.
Original file line number Diff line number Diff line change @@ -69,6 +69,16 @@ extension PAMTokenTests {
6969 pubnub. set ( token: " access-token " )
7070
7171 XCTAssertEqual ( pubnub. configuration. authToken, " access-token " )
72+ XCTAssertEqual ( pubnub. subscription. configuration. authToken, " access-token " )
73+ }
74+
75+ func testChangeToken( ) {
76+ var pubnub = PubNub ( configuration: config)
77+ pubnub. set ( token: " access-token " )
78+ pubnub. set ( token: " access-token-updated " )
79+
80+ XCTAssertEqual ( pubnub. configuration. authToken, " access-token-updated " )
81+ XCTAssertEqual ( pubnub. subscription. configuration. authToken, " access-token-updated " )
7282 }
7383
7484 // swiftlint:enable line_length
You can’t perform that action at this time.
0 commit comments