wiring up new auth endpoint
This commit is contained in:
parent
b6999cef0a
commit
a13fb49942
17 changed files with 850 additions and 37 deletions
|
@ -1,5 +1,6 @@
|
|||
using Refit;
|
||||
using Sledgemapper.Shared.Entities;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
@ -42,12 +43,19 @@ namespace Sledgemapper
|
|||
Task DeleteNote([Body] Note overlay, string sessionName);
|
||||
|
||||
|
||||
[Headers("Authorization")]
|
||||
[Post("/users/register")]
|
||||
Task<HttpResponseMessage> Register([Body] RegisterModel registerModel);
|
||||
public class AuthResult
|
||||
{
|
||||
public string Token { get; set; }
|
||||
public bool Result { get; set; }
|
||||
public List<string> Errors { get; set; }
|
||||
}
|
||||
|
||||
[Headers("Authorization")]
|
||||
[Post("/users/authenticate")]
|
||||
[Post("/authmanagement/register")]
|
||||
Task<AuthResult> Register([Body] RegisterModel registerModel);
|
||||
|
||||
[Headers("Authorization")]
|
||||
[Post("/authmanagement/authenticate")]
|
||||
Task<AuthenticateResponse> Authenticate([Body] AuthenticateModel registerModel);
|
||||
|
||||
[Post("/session/{sessionName}/room")]
|
||||
|
@ -55,5 +63,8 @@ namespace Sledgemapper
|
|||
|
||||
[Post("/session/{sessionName}/line")]
|
||||
Task NewLine(Line line, string sessionName);
|
||||
|
||||
[Post("/campaign/{campaignName}")]
|
||||
Task NewCampaign(string campaignName);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue