-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added AddJwtEncoder() overload accepting IJwtAlgorithm (#385)
* Added overload accepting IJwtAlgorithm * Made overload accepting IAlgorithmFactory private * Added GenericAlgorithmFactory * Bumped version of JWT to 9.0.0-beta5 * Bumped version of JWT.Extensions.DI to 2.0.0-beta1 * Bumped version of JWT.Extensions.AspNetCore to 9.0.0-beta2
- Loading branch information
1 parent
3254c0d
commit e15f629
Showing
7 changed files
with
81 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace JWT.Algorithms | ||
{ | ||
public sealed class GenericAlgorithmFactory<TAlgo> : IAlgorithmFactory | ||
where TAlgo : IJwtAlgorithm, new() | ||
{ | ||
/// <inheritdoc /> | ||
public IJwtAlgorithm Create(JwtDecoderContext context) => | ||
new TAlgo(); | ||
} | ||
} |
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