-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix redirect uri null handling (#56)
* add redirect_uri scheme Signed-off-by: Johannes Tuerk <johannes.tuerk@lissi.id> * fix bug when redirect_uri is null Signed-off-by: Johannes Tuerk <johannes.tuerk@lissi.id> * implement requested changes Signed-off-by: Johannes Tuerk <johannes.tuerk@lissi.id> * adjust oid4vp Signed-off-by: Kevin <kevin.dinh@lissi.id> --------- Signed-off-by: Johannes Tuerk <johannes.tuerk@lissi.id> Signed-off-by: Kevin <kevin.dinh@lissi.id> Co-authored-by: Kevin <kevin.dinh@lissi.id>
- Loading branch information
Showing
5 changed files
with
42 additions
and
8 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
21 changes: 21 additions & 0 deletions
21
src/Hyperledger.Aries/Features/OpenID4VC/Vp/Models/AuthorizationResponseCallback.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,21 @@ | ||
using System; | ||
using Newtonsoft.Json; | ||
|
||
namespace Hyperledger.Aries.Features.OpenId4Vc.Vp.Models | ||
{ | ||
internal record AuthorizationResponseCallback | ||
{ | ||
[JsonProperty("redirect_uri")] | ||
private Uri? RedirectUri { get; } | ||
|
||
public static implicit operator Uri? (AuthorizationResponseCallback? response) => response?.RedirectUri; | ||
|
||
public static implicit operator AuthorizationResponseCallback (Uri redirectUri) => new (redirectUri); | ||
|
||
[JsonConstructor] | ||
private AuthorizationResponseCallback(Uri redirectUri) | ||
{ | ||
RedirectUri = redirectUri; | ||
} | ||
} | ||
} |
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