-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added IPersistentStorage and different stores
- Loading branch information
1 parent
0f24d25
commit 4176dfe
Showing
37 changed files
with
1,038 additions
and
84 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
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
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
49 changes: 49 additions & 0 deletions
49
Abblix.Oidc.Server/Common/Implementation/Utf8JsonBinarySerializer.cs
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Abblix OpenID Connect Server Library | ||
// Copyright (c) 2024 by Abblix LLP | ||
// | ||
// This software is provided 'as-is', without any express or implied warranty. In no | ||
// event will the authors be held liable for any damages arising from the use of this | ||
// software. | ||
// | ||
// Permitted Use: This software is open for use and extension by non-profit, | ||
// educational and community projects under the condition that it remains unmodified | ||
// and used in its entirety through official Nuget packages. Any unauthorized | ||
// modification, forking of the whole repository, or altering individual files is | ||
// strictly prohibited to ensure development occurs solely within the official Abblix LLP | ||
// repository. | ||
// | ||
// Prohibited Actions: Redistribution, modification, incorporation of this software or | ||
// any part thereof into other products, and creation of derivative works are not | ||
// permitted without obtaining a commercial license from Abblix LLP. | ||
// | ||
// Commercial Use: A separate license is required for commercial use, including | ||
// functionalities extended beyond the original software. For information on obtaining | ||
// a commercial license, please contact Abblix LLP. | ||
// | ||
// Enforcement: Unauthorized redistribution, modification, or use of this software in | ||
// other projects or products is strictly prohibited without prior written permission | ||
// from the copyright holder. Violations may be subject to legal action. | ||
// | ||
// For more information, please refer to the license agreement located at: | ||
// https://github.com/Abblix/Oidc.Server/blob/master/README.md | ||
|
||
using System.Text; | ||
using System.Text.Json; | ||
using Abblix.Oidc.Server.Common.Interfaces; | ||
|
||
namespace Abblix.Oidc.Server.Common.Implementation; | ||
|
||
public class Utf8JsonBinarySerializer : IBinarySerializer | ||
{ | ||
public byte[] Serialize<T>(T obj) | ||
{ | ||
var json = JsonSerializer.Serialize(obj); | ||
return Encoding.UTF8.GetBytes(json); | ||
} | ||
|
||
public T? Deserialize<T>(byte[] bytes) | ||
{ | ||
var json = Encoding.UTF8.GetString(bytes); | ||
return JsonSerializer.Deserialize<T>(json); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// Abblix OpenID Connect Server Library | ||
// Copyright (c) 2024 by Abblix LLP | ||
// | ||
// This software is provided 'as-is', without any express or implied warranty. In no | ||
// event will the authors be held liable for any damages arising from the use of this | ||
// software. | ||
// | ||
// Permitted Use: This software is open for use and extension by non-profit, | ||
// educational and community projects under the condition that it remains unmodified | ||
// and used in its entirety through official Nuget packages. Any unauthorized | ||
// modification, forking of the whole repository, or altering individual files is | ||
// strictly prohibited to ensure development occurs solely within the official Abblix LLP | ||
// repository. | ||
// | ||
// Prohibited Actions: Redistribution, modification, incorporation of this software or | ||
// any part thereof into other products, and creation of derivative works are not | ||
// permitted without obtaining a commercial license from Abblix LLP. | ||
// | ||
// Commercial Use: A separate license is required for commercial use, including | ||
// functionalities extended beyond the original software. For information on obtaining | ||
// a commercial license, please contact Abblix LLP. | ||
// | ||
// Enforcement: Unauthorized redistribution, modification, or use of this software in | ||
// other projects or products is strictly prohibited without prior written permission | ||
// from the copyright holder. Violations may be subject to legal action. | ||
// | ||
// For more information, please refer to the license agreement located at: | ||
// https://github.com/Abblix/Oidc.Server/blob/master/README.md | ||
|
||
namespace Abblix.Oidc.Server.Common.Interfaces; | ||
|
||
/// <summary> | ||
/// Defines the contract for a binary serializer that supports serialization and deserialization of objects | ||
/// to and from binary format. | ||
/// </summary> | ||
public interface IBinarySerializer | ||
{ | ||
/// <summary> | ||
/// Serializes an object of type <typeparamref name="T"/> to a binary array. | ||
/// </summary> | ||
/// <typeparam name="T">The type of the object to serialize.</typeparam> | ||
/// <param name="obj">The object to serialize.</param> | ||
/// <returns>A binary array representing the serialized object.</returns> | ||
byte[] Serialize<T>(T obj); | ||
|
||
/// <summary> | ||
/// Deserializes a binary array to an object of type <typeparamref name="T"/>. | ||
/// </summary> | ||
/// <typeparam name="T">The type of the object to deserialize to.</typeparam> | ||
/// <param name="bytes">The binary array to deserialize from.</param> | ||
/// <returns>The deserialized object of type <typeparamref name="T"/>.</returns> | ||
T? Deserialize<T>(byte[] bytes); | ||
} |
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
2 changes: 1 addition & 1 deletion
2
Abblix.Oidc.Server/Endpoints/Authorization/RequestFetching/PushedRequestFetcher.cs
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
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
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
Oops, something went wrong.