Skip to content

Commit

Permalink
xml docs
Browse files Browse the repository at this point in the history
  • Loading branch information
GlitchedPolygons committed Sep 16, 2019
1 parent 20f6bd6 commit 47b3589
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/Services/Web/Users/IRegistrationService.cs
@@ -1,7 +1,29 @@
using System;
using System.Threading.Tasks;

using GlitchedPolygons.GlitchedEpistle.Client.Models;
using GlitchedPolygons.GlitchedEpistle.Client.Models.DTOs;

namespace GlitchedPolygons.GlitchedEpistle.Client.Services.Web.Users
{
/// <summary>
/// Service interface implementation for creating new users on the backend.
/// </summary>
public interface IRegistrationService
{

/// <summary>
/// Submits a user registration request to the Epistle backend and returns the resulting status code.<para> </para>
/// If the user creation succeeded, the created user's data is applied to the currently active session <see cref="User"/>.
/// The meaning of the returned status codes is as follows:<para> </para>
/// 0 = Success! The user was created and the related data was loaded into session <see cref="User"/>.<para> </para>
/// 1 = Connection to the Epistle server could not be established.<para> </para>
/// 2 = RSA Key generation failed/incomplete.<para> </para>
/// 3 = User registration failed server-side.
/// 4 = User registration failed client-side.
/// </summary>
/// <param name="password">The user's password (NOT the SHA512!)</param>
/// <param name="userCreationSecret">The backend's user creation secret.</param>
/// <returns>A tuple containing the resulting status code and (eventually) the <see cref="UserCreationResponseDto"/></returns>
Task<Tuple<int, UserCreationResponseDto>> CreateUser(string password, string userCreationSecret);
}
}

0 comments on commit 47b3589

Please sign in to comment.