Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: c-sharp
version: "6.1.0"
version: "6.2.0"
schema: 1
scm: github.com/pubnub/c-sharp
changelog:
- date: 2022-01-27
version: v6.2.0
changes:
- type: improvement
text: "Bumped PeterO.Cbor library version to 4.5.2."
- date: 2022-01-20
version: v6.1.0
changes:
Expand Down Expand Up @@ -631,7 +636,7 @@ features:
- QUERY-PARAM
supported-platforms:
-
version: Pubnub 'C#' 6.1.0
version: Pubnub 'C#' 6.2.0
platforms:
- Windows 10 and up
- Windows Server 2008 and up
Expand All @@ -641,7 +646,7 @@ supported-platforms:
- .Net Framework 4.5
- .Net Framework 4.6.1+
-
version: PubnubPCL 'C#' 6.1.0
version: PubnubPCL 'C#' 6.2.0
platforms:
- Xamarin.Android
- Xamarin.iOS
Expand All @@ -660,7 +665,7 @@ supported-platforms:
- .Net Standard 2.1
- .Net Core
-
version: PubnubUWP 'C#' 6.1.0
version: PubnubUWP 'C#' 6.2.0
platforms:
- Windows Phone 10
- Universal Windows Apps
Expand All @@ -684,7 +689,7 @@ sdks:
distribution-type: source
distribution-repository: GitHub
package-name: Pubnub
location: https://github.com/pubnub/c-sharp/releases/tag/v6.1.0.0
location: https://github.com/pubnub/c-sharp/releases/tag/v6.2.0.0
requires:
-
name: ".Net"
Expand Down Expand Up @@ -981,7 +986,7 @@ sdks:
distribution-type: source
distribution-repository: GitHub
package-name: PubNubPCL
location: https://github.com/pubnub/c-sharp/releases/tag/v6.1.0.0
location: https://github.com/pubnub/c-sharp/releases/tag/v6.2.0.0
requires:
-
name: ".Net Core"
Expand Down Expand Up @@ -1354,7 +1359,7 @@ sdks:
distribution-type: source
distribution-repository: GitHub
package-name: PubnubUWP
location: https://github.com/pubnub/c-sharp/releases/tag/v6.1.0.0
location: https://github.com/pubnub/c-sharp/releases/tag/v6.2.0.0
requires:
-
name: "Universal Windows Platform Development"
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v6.2.0 - January 27 2022
-----------------------------
- Modified: bumped PeterO.Cbor library version to 4.5.2.

v6.1.0 - January 20 2022
-----------------------------
- Fixed: capture region when exception occur during subscribe.
Expand Down
1 change: 1 addition & 0 deletions src/Api/PubnubApi/EndPoint/TokenManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ private string ReplaceBoundaryQuotes(string key)
&& key.Substring(key.Length - 1, 1).CompareTo("\"") == 0)
{
key = key.Remove(key.Length - 1, 1).Remove(0, 1);
key = Regex.Unescape(key);
}
return key;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Api/PubnubApi/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
[assembly: AssemblyProduct("Pubnub C# SDK")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("6.1.0.0")]
[assembly: AssemblyFileVersion("6.1.0.0")]
[assembly: AssemblyVersion("6.2.0.0")]
[assembly: AssemblyFileVersion("6.2.0.0")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
Expand Down
6 changes: 3 additions & 3 deletions src/Api/PubnubApi/PubnubApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@

<PropertyGroup>
<PackageId>Pubnub</PackageId>
<PackageVersion>6.1.0.0</PackageVersion>
<PackageVersion>6.2.0.0</PackageVersion>
<Title>PubNub C# .NET - Web Data Push API</Title>
<Authors>Pandu Masabathula</Authors>
<Owners>PubNub</Owners>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageIconUrl>http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png</PackageIconUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<RepositoryUrl>https://github.com/pubnub/c-sharp/</RepositoryUrl>
<PackageReleaseNotes>Capture region when exception occur during subscribe.</PackageReleaseNotes>
<PackageReleaseNotes>Bumped PeterO.Cbor library version to 4.5.2.</PackageReleaseNotes>
<PackageTags>Web Data Push Real-time Notifications ESB Message Broadcasting Distributed Computing</PackageTags>
<!--<Summary>PubNub is a Massively Scalable Web Push Service for Web and Mobile Games. This is a cloud-based service for broadcasting messages to thousands of web and mobile clients simultaneously</Summary>-->
<Description>PubNub is a Massively Scalable Web Push Service for Web and Mobile Games. This is a cloud-based service for broadcasting messages to thousands of web and mobile clients simultaneously</Description>
Expand Down Expand Up @@ -62,7 +62,7 @@
<PackageReference Include="Newtonsoft.Json" Version="9.0.1">
<PrivateAssets>None</PrivateAssets>
</PackageReference>
<PackageReference Include="PeterO.Cbor" Version="4.4.4" />
<PackageReference Include="PeterO.Cbor" Version="4.5.2" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net35'">
Expand Down
6 changes: 3 additions & 3 deletions src/Api/PubnubApiPCL/PubnubApiPCL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@

<PropertyGroup>
<PackageId>PubnubPCL</PackageId>
<PackageVersion>6.1.0.0</PackageVersion>
<PackageVersion>6.2.0.0</PackageVersion>
<Title>PubNub C# .NET - Web Data Push API</Title>
<Authors>Pandu Masabathula</Authors>
<Owners>PubNub</Owners>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageIconUrl>http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png</PackageIconUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<RepositoryUrl>https://github.com/pubnub/c-sharp/</RepositoryUrl>
<PackageReleaseNotes>Capture region when exception occur during subscribe.</PackageReleaseNotes>
<PackageReleaseNotes>Bumped PeterO.Cbor library version to 4.5.2.</PackageReleaseNotes>
<PackageTags>Web Data Push Real-time Notifications ESB Message Broadcasting Distributed Computing</PackageTags>
<!--<Summary>PubNub is a Massively Scalable Web Push Service for Web and Mobile Games. This is a cloud-based service for broadcasting messages to thousands of web and mobile clients simultaneously</Summary>-->
<Description>PubNub is a Massively Scalable Web Push Service for Web and Mobile Games. This is a cloud-based service for broadcasting messages to thousands of web and mobile clients simultaneously</Description>
Expand Down Expand Up @@ -584,7 +584,7 @@
<PackageReference Include="NETStandard.Library" Version="1.6.1">
<PrivateAssets>None</PrivateAssets>
</PackageReference>
<PackageReference Include="PeterO.Cbor" Version="4.4.4" />
<PackageReference Include="PeterO.Cbor" Version="4.5.2" />
<PackageReference Include="System.Security.Cryptography.Algorithms" Version="4.3.0" />
<Reference Include="System.Runtime" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/Api/PubnubApiUWP/PubnubApiUWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@

<PropertyGroup>
<PackageId>PubnubUWP</PackageId>
<PackageVersion>6.1.0.0</PackageVersion>
<PackageVersion>6.2.0.0</PackageVersion>
<Title>PubNub C# .NET - Web Data Push API</Title>
<Authors>Pandu Masabathula</Authors>
<Owners>PubNub</Owners>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageIconUrl>http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png</PackageIconUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<RepositoryUrl>https://github.com/pubnub/c-sharp/</RepositoryUrl>
<PackageReleaseNotes>Capture region when exception occur during subscribe.</PackageReleaseNotes>
<PackageReleaseNotes>Bumped PeterO.Cbor library version to 4.5.2.</PackageReleaseNotes>
<PackageTags>Web Data Push Real-time Notifications ESB Message Broadcasting Distributed Computing</PackageTags>
<!--<Summary>PubNub is a Massively Scalable Web Push Service for Web and Mobile Games. This is a cloud-based service for broadcasting messages to thousands of web and mobile clients simultaneously</Summary>-->
<Description>PubNub is a Massively Scalable Web Push Service for Web and Mobile Games. This is a cloud-based service for broadcasting messages to thousands of web and mobile clients simultaneously</Description>
Expand Down Expand Up @@ -672,7 +672,7 @@
<PackageReference Include="Newtonsoft.Json">
<Version>9.0.1</Version>
</PackageReference>
<PackageReference Include="PeterO.Cbor" Version="4.4.4" />
<PackageReference Include="PeterO.Cbor" Version="4.5.2" />
<PackageReference Include="System.Security.Cryptography.Algorithms" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions src/Examples/PubnubApi.ConsoleExample/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="CBOR" publicKeyToken="9cd62db60ea5554c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.5.2.0" newVersion="4.5.2.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,17 @@
<StartupObject>PubnubApiDemo.PubnubExample</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
<HintPath>..\..\packages\Portable.BouncyCastle.1.8.1.2\lib\net4\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="CBOR, Version=4.4.4.0, Culture=neutral, PublicKeyToken=9cd62db60ea5554c, processorArchitecture=MSIL">
<HintPath>..\..\packages\PeterO.Cbor.4.4.4\lib\net40\CBOR.dll</HintPath>
<Reference Include="CBOR, Version=4.5.2.0, Culture=neutral, PublicKeyToken=9cd62db60ea5554c, processorArchitecture=MSIL">
<HintPath>..\..\packages\PeterO.Cbor.4.5.2\lib\net40\CBOR.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Numbers, Version=1.8.1.0, Culture=neutral, PublicKeyToken=9cd62db60ea5554c, processorArchitecture=MSIL">
<HintPath>..\..\packages\PeterO.Numbers.1.8.1\lib\net40\Numbers.dll</HintPath>
<Reference Include="Numbers, Version=1.8.2.0, Culture=neutral, PublicKeyToken=9cd62db60ea5554c, processorArchitecture=MSIL">
<HintPath>..\..\packages\PeterO.Numbers.1.8.2\lib\net40\Numbers.dll</HintPath>
</Reference>
<Reference Include="Pubnub, Version=5.1.0.0, Culture=neutral, PublicKeyToken=dc66f52ce6619f44, processorArchitecture=MSIL">
<HintPath>..\..\packages\Pubnub.5.1.0\lib\net461\Pubnub.dll</HintPath>
<Reference Include="Pubnub, Version=6.1.0.0, Culture=neutral, PublicKeyToken=dc66f52ce6619f44, processorArchitecture=MSIL">
<HintPath>..\..\packages\Pubnub.6.1.0\lib\net461\Pubnub.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
Expand All @@ -67,6 +64,12 @@
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.Numerics" />
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.ValueTuple.4.4.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
Expand Down
9 changes: 5 additions & 4 deletions src/Examples/PubnubApi.ConsoleExample/packages.config
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" />
<package id="PeterO.Cbor" version="4.4.4" targetFramework="net461" />
<package id="PeterO.Numbers" version="1.8.1" targetFramework="net461" />
<package id="PeterO.Cbor" version="4.5.2" targetFramework="net461" />
<package id="PeterO.Numbers" version="1.8.2" targetFramework="net461" />
<package id="PeterO.URIUtility" version="1.0.0" targetFramework="net461" />
<package id="Portable.BouncyCastle" version="1.8.1.2" targetFramework="net461" />
<package id="Pubnub" version="5.1.0" targetFramework="net461" />
<package id="Pubnub" version="6.1.0" targetFramework="net461" />
<package id="System.Collections" version="4.0.11" targetFramework="net461" />
<package id="System.Diagnostics.Debug" version="4.0.11" targetFramework="net461" />
<package id="System.Globalization" version="4.0.11" targetFramework="net461" />
Expand All @@ -17,6 +16,8 @@
<package id="System.Reflection.Extensions" version="4.0.1" targetFramework="net461" />
<package id="System.Runtime" version="4.1.0" targetFramework="net461" />
<package id="System.Runtime.Extensions" version="4.1.0" targetFramework="net461" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net461" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net461" />
<package id="System.Text.Encoding" version="4.0.11" targetFramework="net461" />
<package id="System.ValueTuple" version="4.4.0" targetFramework="net461" />
</packages>
29 changes: 13 additions & 16 deletions src/UnitTests/AcceptanceTests/Features/grant-token.feature
Original file line number Diff line number Diff line change
Expand Up @@ -142,19 +142,16 @@ Feature: Grant an access token
* the error detail location is 'permissions.patterns.uuids.(!<[^>]+>)+'
* the error detail location type is 'body'

Scenario: Validate that a token containing authorized uuid can be parsed correctly
Given I have a known token containing an authorized UUID
When I parse the token
Then the parsed token output contains the authorized UUID "test-authorized-uuid"

Scenario: Validate that a token containing uuid resource permissions can be parsed correctly
Given I have a known token containing UUID resource permissions
When I parse the token
Then the token has 'uuid-1' UUID resource access permissions
* token resource permission GET

Scenario: Validate that a token containing uuid pattern permissions can be parsed correctly
Given I have a known token containing UUID pattern Permissions
When I parse the token
Then the token has '^uuid-\S*$' UUID pattern access permissions
* token pattern permission GET
@contract=grantWithTTLExceedMaxTTL @beta
Scenario: Attempt to grant an access token when ttl provided exceeds the max ttl configured (use default max 43200 for the test)
Given the TTL 43201
Given the 'channel-1' CHANNEL resource access permissions
* grant resource permission READ
When I attempt to grant a token specifying those permissions
Then an error is returned
* the error status code is 400
* the error message is 'Invalid ttl'
* the error source is 'grant'
* the error detail message is 'Range should be 1 to 43200 minute(s).'
* the error detail location is 'ttl'
* the error detail location type is 'body'
Loading