-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from jinaga/interfaces
Inject AuthenticationService by interface
- Loading branch information
Showing
4 changed files
with
38 additions
and
3 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
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,24 @@ | ||
namespace Jinaga.Maui.Authentication; | ||
|
||
/// <summary> | ||
/// Provides authentication services, including token management and user authentication. | ||
/// </summary> | ||
public interface IAuthenticationService | ||
{ | ||
/// <summary> | ||
/// Initializes the authentication service. Call at application startup. | ||
/// </summary> | ||
/// <returns>True if the user is authenticated</returns> | ||
Task<bool> Initialize(); | ||
/// <summary> | ||
/// Log the user in. | ||
/// </summary> | ||
/// <param name="provider">The identifier of the authentication provider to use</param> | ||
/// <returns>True if the user successfully authenticated</returns> | ||
Task<bool> LogIn(string provider); | ||
/// <summary> | ||
/// Log the user out. | ||
/// </summary> | ||
/// <returns>Resolves when logout is successful</returns> | ||
Task LogOut(); | ||
} |
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