26 changed files
WPE.App.Shared.Authentication.Native | ||
Business | ||
Flow | ||
AuthClient.cs + | ||
IAuthClient.cs + | ||
IAuthenticatorProvider.cs + | ||
OpenIDAuthenticationStateProvider.cs + | ||
WebAuthenticatorProvider.cs + | ||
WebBrowserAuthenticator.cs + | ||
Token | ||
ISecureTokenStorage.cs + | ||
ITokenManager.cs + | ||
SecureTokenStorage.cs + | ||
TokenManager.cs + | ||
AuthenticationConfigurationService.cs + | ||
IAuthenticationConfigurationService.cs + | ||
IAuthenticationStateProvider.cs + | ||
LoginService.cs + | ||
Models | ||
AuthenticationConfiguration.cs + | ||
Platforms/Windows | ||
AuthPage.cs + | ||
CustomWebAuthenticatorProvider.cs + | ||
WorkaroundWebAuthenticator.cs + | ||
ServiceCollectionExtensions.cs + | ||
WPE.App.Shared.Authentication.Native.csproj + | ||
.gitignore + | ||
azure-pipelines.yml + | ||
icon.png + | ||
LICENSE + | ||
ReadMe.md + | ||
WPE.App.Shared.Authentication.Native.sln + | ||
AuthClient.cs
/WPE.App.Shared.Authentication.Native/Business/Flow/AuthClient.cs/WPE.App.Shared.Authentication.Native/Business/Flow/AuthClient.cs
IAuthClient.cs
/WPE.App.Shared.Authentication.Native/Business/Flow/IAuthClient.cs+24/WPE.App.Shared.Authentication.Native/Business/Flow/IAuthClient.cs
Add comment 1 Plus using IdentityModel.OidcClient;
Add comment 2 Plus using IdentityModel.OidcClient.Results;
Add comment 3 Plus
Add comment 4 Plus namespace Infsoft.WPE.App.Shared.Authentication.Native.Business.Flow
Add comment 5 Plus {
Add comment 6 Plus /// <summary>
Add comment 7 Plus /// OIDC auth client
Add comment 8 Plus /// </summary>
Add comment 9 Plus internal interface IAuthClient
Add comment 10 Plus {
Add comment 11 Plus /// <summary>
Add comment 12 Plus /// Start a login and resolve tokens
Add comment 13 Plus /// </summary>
Add comment 14 Plus /// <returns>Result of login flow, contains all tokens if successfull</returns>
Add comment 15 Plus Task<LoginResult> LoginAsync();
Add comment 16 Plus
Add comment 17 Plus /// <summary>
Add comment 18 Plus /// Refresh all tokens with given refresh token and resolve them
Add comment 19 Plus /// </summary>
Add comment 20 Plus /// <param name="refreshToken">Token to authenticate refresh</param>
Add comment 21 Plus /// <returns>Result of token refresh, contains all tokens if successfull</returns>
Add comment 22 Plus Task<RefreshTokenResult> RefreshTokens(string refreshToken);
Add comment 23 Plus }
Add comment 24 Plus }
IAuthenticatorProvider.cs
/WPE.App.Shared.Authentication.Native/Business/Flow/IAuthenticatorProvider.cs+14/WPE.App.Shared.Authentication.Native/Business/Flow/IAuthenticatorProvider.cs
Add comment 1 Plus namespace Infsoft.WPE.App.Shared.Authentication.Native.Business.Flow
Add comment 2 Plus {
Add comment 3 Plus /// <summary>
Add comment 4 Plus /// Provides the WebAuthenticator to use, allows for platform dependend implementations
Add comment 5 Plus /// </summary>
Add comment 6 Plus internal interface IAuthenticatorProvider
Add comment 7 Plus {
Add comment 8 Plus /// <summary>
Add comment 9 Plus /// Return the authenticator instance for this platform
Add comment 10 Plus /// </summary>
Add comment 11 Plus /// <returns></returns>
Add comment 12 Plus IWebAuthenticator GetAuthenticator();
Add comment 13 Plus }
Add comment 14 Plus }
OpenIDAuthenticationStateProvider.cs
/WPE.App.Shared.Authentication.Native/Business/Flow/OpenIDAuthenticationStateProvider.cs/WPE.App.Shared.Authentication.Native/Business/Flow/OpenIDAuthenticationStateProvider.cs
WebAuthenticatorProvider.cs
/WPE.App.Shared.Authentication.Native/Business/Flow/WebAuthenticatorProvider.cs/WPE.App.Shared.Authentication.Native/Business/Flow/WebAuthenticatorProvider.cs
WebBrowserAuthenticator.cs
/WPE.App.Shared.Authentication.Native/Business/Flow/WebBrowserAuthenticator.cs/WPE.App.Shared.Authentication.Native/Business/Flow/WebBrowserAuthenticator.cs
ISecureTokenStorage.cs
/WPE.App.Shared.Authentication.Native/Business/Token/ISecureTokenStorage.cs/WPE.App.Shared.Authentication.Native/Business/Token/ISecureTokenStorage.cs
ITokenManager.cs
/WPE.App.Shared.Authentication.Native/Business/Token/ITokenManager.cs/WPE.App.Shared.Authentication.Native/Business/Token/ITokenManager.cs
SecureTokenStorage.cs
/WPE.App.Shared.Authentication.Native/Business/Token/SecureTokenStorage.cs/WPE.App.Shared.Authentication.Native/Business/Token/SecureTokenStorage.cs
TokenManager.cs
/WPE.App.Shared.Authentication.Native/Business/Token/TokenManager.cs/WPE.App.Shared.Authentication.Native/Business/Token/TokenManager.cs
AuthenticationConfigurationService.cs
/WPE.App.Shared.Authentication.Native/Business/AuthenticationConfigurationService.cs/WPE.App.Shared.Authentication.Native/Business/AuthenticationConfigurationService.cs
IAuthenticationConfigurationService.cs
/WPE.App.Shared.Authentication.Native/Business/IAuthenticationConfigurationService.cs/WPE.App.Shared.Authentication.Native/Business/IAuthenticationConfigurationService.cs
IAuthenticationStateProvider.cs
/WPE.App.Shared.Authentication.Native/Business/IAuthenticationStateProvider.cs/WPE.App.Shared.Authentication.Native/Business/IAuthenticationStateProvider.cs
LoginService.cs
/WPE.App.Shared.Authentication.Native/Business/LoginService.cs/WPE.App.Shared.Authentication.Native/Business/LoginService.cs
AuthenticationConfiguration.cs
/WPE.App.Shared.Authentication.Native/Models/AuthenticationConfiguration.cs/WPE.App.Shared.Authentication.Native/Models/AuthenticationConfiguration.cs
AuthPage.cs
/WPE.App.Shared.Authentication.Native/Platforms/Windows/AuthPage.cs/WPE.App.Shared.Authentication.Native/Platforms/Windows/AuthPage.cs
CustomWebAuthenticatorProvider.cs
/WPE.App.Shared.Authentication.Native/Platforms/Windows/CustomWebAuthenticatorProvider.cs/WPE.App.Shared.Authentication.Native/Platforms/Windows/CustomWebAuthenticatorProvider.cs
WorkaroundWebAuthenticator.cs
/WPE.App.Shared.Authentication.Native/Platforms/Windows/WorkaroundWebAuthenticator.cs/WPE.App.Shared.Authentication.Native/Platforms/Windows/WorkaroundWebAuthenticator.cs
ServiceCollectionExtensions.cs
/WPE.App.Shared.Authentication.Native/ServiceCollectionExtensions.cs/WPE.App.Shared.Authentication.Native/ServiceCollectionExtensions.cs
WPE.App.Shared.Authentication.Native.csproj
/WPE.App.Shared.Authentication.Native/WPE.App.Shared.Authentication.Native.csproj/WPE.App.Shared.Authentication.Native/WPE.App.Shared.Authentication.Native.csproj
WPE.App.Shared.Authentication.Native.sln
/WPE.App.Shared.Authentication.Native.sln/WPE.App.Shared.Authentication.Native.sln