Skip to content

Commit

Permalink
feat: user models
Browse files Browse the repository at this point in the history
  • Loading branch information
alefcarlos committed Sep 29, 2019
1 parent 49c571b commit cb5fd2e
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Handlers/AuthenticationHeaderHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public AuthenticationHeaderHandler(IKeyCloakAuthClient authClient, IOptions<KeyC

protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
var form = new LoginForm{
var form = new LoginForm
{
client_id = settings.ClientId,
username = settings.UserName,
password = settings.Password,
Expand Down
10 changes: 10 additions & 0 deletions src/ViewModels/LoginForm.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace PlusUltra.KeyCloak.ApiClient.ViewModels
{
public class LoginForm
{
public string grant_type { get; set; }
public string username { get; set; }
public string password { get; set; }
public string client_id { get; set; }
}
}
7 changes: 7 additions & 0 deletions src/ViewModels/Token.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace PlusUltra.KeyCloak.ApiClient.ViewModels
{
public class Token
{
public string access_token { get; set; }
}
}
13 changes: 13 additions & 0 deletions src/ViewModels/User.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;

namespace PlusUltra.KeyCloak.ApiClient.ViewModels
{
public class User
{
public Guid Id { get; set; }
public string UserName { get; set; }
public string Email { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
}
}

0 comments on commit cb5fd2e

Please sign in to comment.