Skip to content

Commit c7f0a7f

Browse files
authored
chore: Deprecating support for net45 and netstandard1.5 (#255)
1 parent ad97c69 commit c7f0a7f

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

FirebaseAdmin/FirebaseAdmin/Auth/Jwt/FirebaseTokenVerifier.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ private async Task VerifySignatureAsync(
290290
var keys = await this.keySource.GetPublicKeysAsync(cancellationToken)
291291
.ConfigureAwait(false);
292292
var verified = keys.Any(key =>
293-
#if NETSTANDARD1_5 || NETSTANDARD2_0
293+
#if NETSTANDARD1_5 || NETSTANDARD2_0 || NET461
294294
key.Id == keyId && key.RSA.VerifyHash(
295295
hash, signature, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1)
296296
#elif NET45

FirebaseAdmin/FirebaseAdmin/Auth/Jwt/HttpPublicKeySource.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
using Google.Apis.Http;
2525
using Google.Apis.Util;
2626

27-
#if NETSTANDARD1_5 || NETSTANDARD2_0
27+
#if NETSTANDARD1_5 || NETSTANDARD2_0 || NET461
2828
using RSAKey = System.Security.Cryptography.RSA;
2929
#elif NET45
3030
using RSAKey = System.Security.Cryptography.RSACryptoServiceProvider;
@@ -132,7 +132,7 @@ private IReadOnlyList<PublicKey> ParseKeys(DeserializedResponseInfo<Dictionary<s
132132
{
133133
var x509cert = new X509Certificate2(Encoding.UTF8.GetBytes(entry.Value));
134134
RSAKey rsa;
135-
#if NETSTANDARD1_5 || NETSTANDARD2_0
135+
#if NETSTANDARD1_5 || NETSTANDARD2_0 || NET461
136136
rsa = x509cert.GetRSAPublicKey();
137137
#elif NET45
138138
rsa = (RSAKey)x509cert.PublicKey.Key;

FirebaseAdmin/FirebaseAdmin/Auth/Jwt/PublicKey.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#if NETSTANDARD1_5 || NETSTANDARD2_0
15+
#if NETSTANDARD1_5 || NETSTANDARD2_0 || NET461
1616
using RSAKey = System.Security.Cryptography.RSA;
1717
#elif NET45
1818
using RSAKey = System.Security.Cryptography.RSACryptoServiceProvider;

FirebaseAdmin/FirebaseAdmin/FirebaseAdmin.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<Version>1.16.0</Version>
5-
<TargetFrameworks>netstandard1.5;netstandard2.0;net45</TargetFrameworks>
5+
<TargetFrameworks>netstandard1.5;netstandard2.0;net45;net461</TargetFrameworks>
66
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard1.5;netstandard2.0</TargetFrameworks>
77
<LangVersion>latest</LangVersion>
88
<GenerateDocumentationFile>true</GenerateDocumentationFile>

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,18 @@ We also welcome bug reports, feature requests, and code review feedback.
5959

6060
Admin .NET SDK supports the following frameworks:
6161

62-
* .NET Framework 4.5+
63-
* netstandard 1.5 and 2.0, providing .NET Core support
62+
* .NET Framework 4.5+ (4.6.1+ recommended)
63+
* netstandard 1.5 and 2.0 (2.0 recommended), providing .NET Core support
6464

6565
This is consistent with the frameworks supported by other .NET libraries
6666
associated with Google Cloud Platform.
6767

68+
Support for .NET Framework 4.5 and netstandard 1.5 is now deprecated.
69+
Next major version of the Admin SDK will terminate support for these
70+
frameworks. Developers are advised to upgrade their runtime frameworks
71+
accordingly.
72+
73+
6874
## Documentation
6975

7076
* [Setup Guide](https://firebase.google.com/docs/admin/setup/)

0 commit comments

Comments
 (0)