Skip to content

Commit

Permalink
migrate projects for new api clients
Browse files Browse the repository at this point in the history
  • Loading branch information
josxha committed Apr 17, 2024
1 parent beb18c2 commit a2356f2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions KratosSelfService/Controllers/OAuth2Controller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ private async Task<HydraOAuth2RedirectTo> AcceptRequest(string challenge, List<s

private bool CanSkipConsent(HydraOAuth2ConsentRequest challenge)
{
if (challenge.Skip || challenge._Client.SkipConsent) return true;
if (challenge.Skip || challenge.VarClient.SkipConsent) return true;

if (challenge._Client.ClientId == null || env.HydraTrustedClientIds == null) return false;
return env.HydraTrustedClientIds.Split(",").Contains(challenge._Client.ClientId);
if (challenge.VarClient.ClientId == null || env.HydraTrustedClientIds == null) return false;
return env.HydraTrustedClientIds.Split(",").Contains(challenge.VarClient.ClientId);
}
}
4 changes: 2 additions & 2 deletions KratosSelfService/Views/OAuth2/Consent.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
@{
ViewData["Title"] = CustomTranslator.Get("Grant access");
Layout = "_CardLayout";
var clientName = Model.request._Client.ClientName;
if (string.IsNullOrWhiteSpace(clientName)) clientName = Model.request._Client.ClientId;
var clientName = Model.request.VarClient.ClientName;
if (string.IsNullOrWhiteSpace(clientName)) clientName = Model.request.VarClient.ClientId;
}

<form class="section" action="consent" method="post">
Expand Down
4 changes: 2 additions & 2 deletions OryAdmin/Components/Pages/Home.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ protected override async Task OnInitializedAsync()
try
{
var version = await ApiService.KratosMetadata.GetVersionAsync();
_kratosVersion = version._Version;
_kratosVersion = version.VarVersion;
}
catch (Exception)
{
Expand Down Expand Up @@ -104,7 +104,7 @@ protected override async Task OnInitializedAsync()
try
{
var version = await ApiService.HydraMetadata.GetVersionAsync();
_hydraVersion = version._Version;
_hydraVersion = version.VarVersion;
}
catch (Exception)
{
Expand Down
8 changes: 4 additions & 4 deletions OryAdmin/Components/Pages/Identities/Users/View.razor
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ else
{
<tr>
<td>
<a href="oauth2/clients/@session.ConsentRequest._Client.ClientId">
@session.ConsentRequest._Client.ClientName
<a href="oauth2/clients/@session.ConsentRequest.VarClient.ClientId">
@session.ConsentRequest.VarClient.ClientName
</a>
</td>
@if (session.ConsentRequest.Skip || session.ConsentRequest._Client.SkipConsent)
@if (session.ConsentRequest.Skip || session.ConsentRequest.VarClient.SkipConsent)
{
<td>Consent skipped</td>
}
Expand Down Expand Up @@ -341,7 +341,7 @@ else
{
<tr>
<td>@credential.Type</td>
<td>@credential._Version</td>
<td>@credential.VarVersion</td>
<td>@string.Join(", ", credential.Identifiers)</td>
<td>
<p>Updated: @credential.UpdatedAt</p>
Expand Down

0 comments on commit a2356f2

Please sign in to comment.