Added a auth app
This commit is contained in:
parent
ec1274df7f
commit
1df4d64edf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -17,9 +17,7 @@
|
|||
%SYSTEMDRIVE% - The drive letter of %IIS_BIN%
|
||||
|
||||
-->
|
||||
|
||||
<configuration>
|
||||
|
||||
<!--
|
||||
|
||||
The <configSections> section controls the registration of sections.
|
||||
|
@ -58,7 +56,6 @@
|
|||
<section name="sites" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
<section name="webLimits" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
|
||||
</sectionGroup>
|
||||
|
||||
<sectionGroup name="system.webServer">
|
||||
<section name="asp" overrideModeDefault="Deny" />
|
||||
<section name="caching" overrideModeDefault="Allow" />
|
||||
|
@ -118,9 +115,9 @@
|
|||
<section name="rewriteMaps" overrideModeDefault="Allow" />
|
||||
</sectionGroup>
|
||||
<section name="webSocket" overrideModeDefault="Deny" />
|
||||
<section name="aspNetCore" overrideModeDefault="Allow" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<configProtectedData>
|
||||
<providers>
|
||||
<add name="IISWASOnlyRsaProvider" type="" description="Uses RsaCryptoServiceProvider to encrypt and decrypt" keyContainerName="iisWasKey" cspProviderName="" useMachineContainer="true" useOAEP="false" />
|
||||
|
@ -128,20 +125,18 @@
|
|||
<add name="IISWASOnlyAesProvider" type="Microsoft.ApplicationHost.AesProtectedConfigurationProvider" description="Uses an AES session key to encrypt and decrypt" keyContainerName="iisWasKey" cspProviderName="" useOAEP="false" useMachineContainer="true" sessionKey="AQIAAA5mAAAApAAALmU8lTC+v2qtfQiiiquvvLpUQqKLEXs+jSKoWCM/uPhyB++k4dwug19mGidNK5FYiWK2KYE1yhjVJcbp12E98Q0R2nT7eBiCMY2JairxQ591rqABK7keGaIjwH7PwGzSpILl3RJ4YFvJ/7ZXEJxeDZIjW8ZxWVXx+/VyHs9U3WguLEkgMUX3jrxJi8LouxaIVPJAv/YQ1ZCWs8zImitxX/C/7o7yaIxznfsN5nGQzQfpUDPeby99aw2zPVTtZI2LaWIBON8guABvZ6JtJVDWmfdK6sodbnwdZkr6/Z2rfvamT1dC1SpQrGG7ulR/f9/GXvCaW10ZVKxekBF/CYlNMg==" />
|
||||
</providers>
|
||||
</configProtectedData>
|
||||
|
||||
<system.applicationHost>
|
||||
|
||||
<applicationPools>
|
||||
<add name="Clr4IntegratedAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
|
||||
<add name="Clr4ClassicAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Classic" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
|
||||
<add name="Clr2IntegratedAppPool" managedRuntimeVersion="v2.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
|
||||
<add name="Clr2ClassicAppPool" managedRuntimeVersion="v2.0" managedPipelineMode="Classic" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
|
||||
<add name="UnmanagedClassicAppPool" managedRuntimeVersion="" managedPipelineMode="Classic" autoStart="true" />
|
||||
<add name="Authenticator AppPool" managedRuntimeVersion="" />
|
||||
<applicationPoolDefaults managedRuntimeVersion="v4.0">
|
||||
<processModel loadUserProfile="true" setProfileEnvironment="false" />
|
||||
</applicationPoolDefaults>
|
||||
</applicationPools>
|
||||
|
||||
<!--
|
||||
|
||||
The <listenerAdapters> section defines the protocols with which the
|
||||
|
@ -151,7 +146,6 @@
|
|||
<listenerAdapters>
|
||||
<add name="http" />
|
||||
</listenerAdapters>
|
||||
|
||||
<sites>
|
||||
<site name="WebSite1" id="1" serverAutoStart="true">
|
||||
<application path="/">
|
||||
|
@ -161,33 +155,33 @@
|
|||
<binding protocol="http" bindingInformation=":8080:localhost" />
|
||||
</bindings>
|
||||
</site>
|
||||
<site name="Authenticator" id="2">
|
||||
<application path="/" applicationPool="Authenticator AppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\FastAccessFiles\OtherCodingProjects\QUR\Authenticator" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:65283:localhost" />
|
||||
<binding protocol="https" bindingInformation="*:44398:localhost" />
|
||||
</bindings>
|
||||
</site>
|
||||
<siteDefaults>
|
||||
<!-- To enable logging, please change the below attribute "enabled" to "true" -->
|
||||
<logFile logFormat="W3C" directory="%AppData%\Microsoft\IISExpressLogs" enabled="false"/>
|
||||
<logFile logFormat="W3C" directory="%AppData%\Microsoft\IISExpressLogs" enabled="false" />
|
||||
<traceFailedRequestsLogging directory="%AppData%\Microsoft" enabled="false" maxLogFileSizeKB="1024" />
|
||||
</siteDefaults>
|
||||
<applicationDefaults applicationPool="Clr4IntegratedAppPool" />
|
||||
<virtualDirectoryDefaults allowSubDirConfig="true" />
|
||||
</sites>
|
||||
|
||||
<webLimits />
|
||||
|
||||
</system.applicationHost>
|
||||
|
||||
<system.webServer>
|
||||
|
||||
<serverRuntime />
|
||||
|
||||
<asp scriptErrorSentToBrowser="true">
|
||||
<cache diskTemplateCacheDirectory="%TEMP%\iisexpress\ASP Compiled Templates" />
|
||||
<limits />
|
||||
</asp>
|
||||
|
||||
<caching enabled="true" enableKernelCache="true">
|
||||
</caching>
|
||||
|
||||
<caching enabled="true" enableKernelCache="true"></caching>
|
||||
<cgi />
|
||||
|
||||
<defaultDocument enabled="true">
|
||||
<files>
|
||||
<add value="Default.htm" />
|
||||
|
@ -198,11 +192,8 @@
|
|||
<add value="default.aspx" />
|
||||
</files>
|
||||
</defaultDocument>
|
||||
|
||||
<directoryBrowse enabled="false" />
|
||||
|
||||
<fastCgi />
|
||||
|
||||
<!--
|
||||
|
||||
The <globalModules> section defines all native-code modules.
|
||||
|
@ -238,7 +229,7 @@
|
|||
<add name="IsapiFilterModule" image="%IIS_BIN%\filter.dll" />
|
||||
<add name="CgiModule" image="%IIS_BIN%\cgi.dll" />
|
||||
<add name="FastCgiModule" image="%IIS_BIN%\iisfcgi.dll" />
|
||||
<!-- <add name="WebDAVModule" image="%IIS_BIN%\webdav.dll" /> -->
|
||||
<!-- <add name="WebDAVModule" image="%IIS_BIN%\webdav.dll" /> -->
|
||||
<add name="RewriteModule" image="%IIS_BIN%\rewrite.dll" />
|
||||
<add name="ConfigurationValidationModule" image="%IIS_BIN%\validcfg.dll" />
|
||||
<add name="WebSocketModule" image="%IIS_BIN%\iiswsock.dll" />
|
||||
|
@ -248,8 +239,8 @@
|
|||
<add name="ManagedEngineV4.0_32bit" image="%windir%\Microsoft.NET\Framework\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness32" />
|
||||
<add name="ManagedEngineV4.0_64bit" image="%windir%\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness64" />
|
||||
<add name="ApplicationInitializationModule" image="%IIS_BIN%\warmup.dll" />
|
||||
<add name="AspNetCoreModuleV2" image="%IIS_BIN%\Asp.Net Core Module\V2\aspnetcorev2.dll" />
|
||||
</globalModules>
|
||||
|
||||
<httpCompression directory="%TEMP%">
|
||||
<scheme name="gzip" dll="%IIS_BIN%\gzip.dll" />
|
||||
<dynamicTypes>
|
||||
|
@ -269,7 +260,6 @@
|
|||
<add mimeType="*/*" enabled="false" />
|
||||
</staticTypes>
|
||||
</httpCompression>
|
||||
|
||||
<httpErrors lockAttributes="allowAbsolutePathsWhenDelegated,defaultPath">
|
||||
<error statusCode="401" prefixLanguageFilePath="%IIS_BIN%\custerr" path="401.htm" />
|
||||
<error statusCode="403" prefixLanguageFilePath="%IIS_BIN%\custerr" path="403.htm" />
|
||||
|
@ -281,9 +271,7 @@
|
|||
<error statusCode="501" prefixLanguageFilePath="%IIS_BIN%\custerr" path="501.htm" />
|
||||
<error statusCode="502" prefixLanguageFilePath="%IIS_BIN%\custerr" path="502.htm" />
|
||||
</httpErrors>
|
||||
|
||||
<httpLogging dontLog="false" />
|
||||
|
||||
<httpProtocol>
|
||||
<customHeaders>
|
||||
<clear />
|
||||
|
@ -293,11 +281,8 @@
|
|||
<clear />
|
||||
</redirectHeaders>
|
||||
</httpProtocol>
|
||||
|
||||
<httpRedirect enabled="false" />
|
||||
|
||||
<httpTracing />
|
||||
|
||||
<isapiFilters>
|
||||
<filter name="ASP.Net_2.0.50727-64" path="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="bitness64,runtimeVersionv2.0" />
|
||||
<filter name="ASP.Net_2.0.50727.0" path="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="bitness32,runtimeVersionv2.0" />
|
||||
|
@ -305,52 +290,35 @@
|
|||
<filter name="ASP.Net_4.0_32bit" path="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_filter.dll" enableCache="true" preCondition="bitness32,runtimeVersionv4.0" />
|
||||
<filter name="ASP.Net_4.0_64bit" path="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_filter.dll" enableCache="true" preCondition="bitness64,runtimeVersionv4.0" />
|
||||
</isapiFilters>
|
||||
|
||||
<odbcLogging />
|
||||
|
||||
<security>
|
||||
|
||||
<access sslFlags="None" />
|
||||
|
||||
<applicationDependencies>
|
||||
<application name="Active Server Pages" groupId="ASP" />
|
||||
</applicationDependencies>
|
||||
|
||||
<authentication>
|
||||
|
||||
<anonymousAuthentication enabled="true" userName="" />
|
||||
|
||||
<basicAuthentication enabled="false" />
|
||||
|
||||
<clientCertificateMappingAuthentication enabled="false" />
|
||||
|
||||
<digestAuthentication enabled="false" />
|
||||
|
||||
<iisClientCertificateMappingAuthentication enabled="false">
|
||||
</iisClientCertificateMappingAuthentication>
|
||||
|
||||
<iisClientCertificateMappingAuthentication enabled="false"></iisClientCertificateMappingAuthentication>
|
||||
<windowsAuthentication enabled="false">
|
||||
<providers>
|
||||
<add value="Negotiate" />
|
||||
<add value="NTLM" />
|
||||
</providers>
|
||||
</windowsAuthentication>
|
||||
|
||||
</authentication>
|
||||
|
||||
<authorization>
|
||||
<add accessType="Allow" users="*" />
|
||||
</authorization>
|
||||
|
||||
<ipSecurity allowUnlisted="true" />
|
||||
|
||||
<isapiCgiRestriction notListedIsapisAllowed="true" notListedCgisAllowed="true">
|
||||
<add path="%windir%\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll" allowed="true" groupId="ASP.NET_v4.0" description="ASP.NET_v4.0" />
|
||||
<add path="%windir%\Microsoft.NET\Framework\v4.0.30319\webengine4.dll" allowed="true" groupId="ASP.NET_v4.0" description="ASP.NET_v4.0" />
|
||||
<add path="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" allowed="true" groupId="ASP.NET v2.0.50727" description="ASP.NET v2.0.50727" />
|
||||
<add path="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" allowed="true" groupId="ASP.NET v2.0.50727" description="ASP.NET v2.0.50727" />
|
||||
</isapiCgiRestriction>
|
||||
|
||||
<requestFiltering>
|
||||
<fileExtensions allowUnlisted="true" applyToWebDAV="true">
|
||||
<add fileExtension=".asa" allowed="false" />
|
||||
|
@ -410,11 +378,8 @@
|
|||
<add segment="App_Browsers" />
|
||||
</hiddenSegments>
|
||||
</requestFiltering>
|
||||
|
||||
</security>
|
||||
|
||||
<serverSideInclude ssiExecDisable="false" />
|
||||
|
||||
<staticContent lockAttributes="isDocFooterFileName">
|
||||
<mimeMap fileExtension=".323" mimeType="text/h323" />
|
||||
<mimeMap fileExtension=".3g2" mimeType="video/3gpp2" />
|
||||
|
@ -795,9 +760,7 @@
|
|||
<mimeMap fileExtension=".z" mimeType="application/x-compress" />
|
||||
<mimeMap fileExtension=".zip" mimeType="application/x-zip-compressed" />
|
||||
</staticContent>
|
||||
|
||||
<tracing>
|
||||
|
||||
<traceFailedRequests>
|
||||
<add path="*">
|
||||
<traceAreas>
|
||||
|
@ -809,7 +772,6 @@
|
|||
<failureDefinitions statusCodes="200-999" />
|
||||
</add>
|
||||
</traceFailedRequests>
|
||||
|
||||
<traceProviderDefinitions>
|
||||
<add name="WWW Server" guid="{3a2a4e84-4c21-4981-ae10-3fda0d9b0f83}">
|
||||
<areas>
|
||||
|
@ -847,11 +809,8 @@
|
|||
</areas>
|
||||
</add>
|
||||
</traceProviderDefinitions>
|
||||
|
||||
</tracing>
|
||||
|
||||
<urlCompression />
|
||||
|
||||
<validation />
|
||||
<webdav>
|
||||
<globalSettings>
|
||||
|
@ -861,7 +820,6 @@
|
|||
<lockStores>
|
||||
<add name="webdav_simple_lock" image="%IIS_BIN%\webdav_simple_lock.dll" image32="%IIS_BIN%\webdav_simple_lock.dll" />
|
||||
</lockStores>
|
||||
|
||||
</globalSettings>
|
||||
<authoring>
|
||||
<locks enabled="true" lockStore="webdav_simple_lock" />
|
||||
|
@ -870,7 +828,6 @@
|
|||
</webdav>
|
||||
<webSocket />
|
||||
<applicationInitialization />
|
||||
|
||||
</system.webServer>
|
||||
<location path="" overrideMode="Allow">
|
||||
<system.webServer>
|
||||
|
@ -901,7 +858,7 @@
|
|||
<add name="FailedRequestsTracingModule" lockItem="true" />
|
||||
<add name="CgiModule" lockItem="true" />
|
||||
<add name="FastCgiModule" lockItem="true" />
|
||||
<!-- <add name="WebDAVModule" /> -->
|
||||
<!-- <add name="WebDAVModule" /> -->
|
||||
<add name="RewriteModule" />
|
||||
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule" preCondition="managedHandler" />
|
||||
<add name="Session" type="System.Web.SessionState.SessionStateModule" preCondition="managedHandler" />
|
||||
|
@ -921,9 +878,10 @@
|
|||
<add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="managedHandler,runtimeVersionv4.0" />
|
||||
<add name="ScriptModule-4.0" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler,runtimeVersionv4.0" />
|
||||
<add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler,runtimeVersionv2.0" />
|
||||
<add name="AspNetCoreModuleV2" />
|
||||
</modules>
|
||||
<handlers accessPolicy="Read, Script">
|
||||
<!-- <add name="WebDAV" path="*" verb="PROPFIND,PROPPATCH,MKCOL,PUT,COPY,DELETE,MOVE,LOCK,UNLOCK" modules="WebDAVModule" resourceType="Unspecified" requireAccess="None" /> -->
|
||||
<!-- <add name="WebDAV" path="*" verb="PROPFIND,PROPPATCH,MKCOL,PUT,COPY,DELETE,MOVE,LOCK,UNLOCK" modules="WebDAVModule" resourceType="Unspecified" requireAccess="None" /> -->
|
||||
<add name="AXD-ISAPI-4.0_64bit" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="PageHandlerFactory-ISAPI-4.0_64bit" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="SimpleHandlerFactory-ISAPI-4.0_64bit" path="*.ashx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
|
@ -1018,4 +976,20 @@
|
|||
</handlers>
|
||||
</system.webServer>
|
||||
</location>
|
||||
<location path="Authenticator" inheritInChildApplications="false">
|
||||
<system.webServer>
|
||||
<modules>
|
||||
<remove name="WebMatrixSupportModule" />
|
||||
</modules>
|
||||
<handlers>
|
||||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
|
||||
</handlers>
|
||||
<aspNetCore processPath="%LAUNCHER_PATH%" stdoutLogEnabled="false" hostingModel="InProcess" startupTimeLimit="3600" requestTimeout="23:00:00" />
|
||||
<httpCompression>
|
||||
<dynamicTypes>
|
||||
<add mimeType="text/event-stream" enabled="false" />
|
||||
</dynamicTypes>
|
||||
</httpCompression>
|
||||
</system.webServer>
|
||||
</location>
|
||||
</configuration>
|
BIN
.vs/QUR/v17/.suo
BIN
.vs/QUR/v17/.suo
Binary file not shown.
|
@ -0,0 +1,11 @@
|
|||
<Router AppAssembly="@typeof(App).Assembly">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
|
||||
</Found>
|
||||
<NotFound>
|
||||
<PageTitle>Not found</PageTitle>
|
||||
<LayoutView Layout="@typeof(MainLayout)">
|
||||
<p role="alert">Sorry, there's nothing at this address.</p>
|
||||
</LayoutView>
|
||||
</NotFound>
|
||||
</Router>
|
|
@ -0,0 +1,20 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.2" PrivateAssets="all" />
|
||||
<PackageReference Include="MudBlazor" Version="6.0.6" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31717.71
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authenticator", "Authenticator.csproj", "{BE8AE6C9-BE8F-424A-9FE1-14F13E13243A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{BE8AE6C9-BE8F-424A-9FE1-14F13E13243A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BE8AE6C9-BE8F-424A-9FE1-14F13E13243A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BE8AE6C9-BE8F-424A-9FE1-14F13E13243A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BE8AE6C9-BE8F-424A-9FE1-14F13E13243A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {DEABC887-95C9-4ED2-A439-A3BD57791E38}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,60 @@
|
|||
@page "/"
|
||||
@using System.Text;
|
||||
|
||||
@inject NavigationManager navigator
|
||||
|
||||
<PageTitle>Code</PageTitle>
|
||||
|
||||
<MudText Typo="Typo.h3" GutterBottom="true">Here's your code</MudText>
|
||||
@* <MudText Typo="Typo.subtitle1">IMPORTANT: Take only 17 charecters from anywhere in the code!</MudText>*@
|
||||
<MudPaper Class="pa-4" >
|
||||
<MudText Class="mb-8 flex-wrap" Typo="Typo.body1" Style="word-wrap:break-word;">@authCode</MudText>
|
||||
</MudPaper>
|
||||
|
||||
@if (verified)
|
||||
{
|
||||
<MudText Typo="Typo.body2"> Verified!</MudText>
|
||||
}
|
||||
|
||||
@code {
|
||||
string authCode = "";
|
||||
bool verified = false;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
string semiCode = GetCode();
|
||||
string guess = semiCode.Skip(15).Take(17).ToString();
|
||||
|
||||
if (authCode.Contains(guess))
|
||||
verified = true;
|
||||
|
||||
await Task.Delay(30000);
|
||||
|
||||
navigator.NavigateTo("", true);
|
||||
}
|
||||
|
||||
public string GetCode()
|
||||
{
|
||||
var time = DateTime.Now;
|
||||
Random random = new Random(time.Hour);
|
||||
|
||||
var sb = new StringBuilder();
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
string salt = (i + random.NextDouble()).ToString();
|
||||
sb.AppendLine(salt);
|
||||
}
|
||||
|
||||
string semicode = Base64Encode(time.ToString("HH") + sb.ToString());
|
||||
semicode = semicode.Trim('=');
|
||||
authCode = semicode;
|
||||
|
||||
return semicode;
|
||||
}
|
||||
|
||||
public static string Base64Encode(string plainText)
|
||||
{
|
||||
var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText);
|
||||
return System.Convert.ToBase64String(plainTextBytes);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using Authenticator;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
||||
using MudBlazor.Services;
|
||||
|
||||
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
||||
builder.RootComponents.Add<App>("#app");
|
||||
builder.RootComponents.Add<HeadOutlet>("head::after");
|
||||
|
||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
|
||||
builder.Services.AddMudServices();
|
||||
|
||||
await builder.Build().RunAsync();
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:65283",
|
||||
"sslPort": 44398
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"Mudblazor.Template": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": "true",
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"applicationUrl": "https://localhost:5001;http://localhost:5000",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
@inherits LayoutComponentBase
|
||||
|
||||
<MudThemeProvider IsDarkMode=true />
|
||||
<MudDialogProvider />
|
||||
<MudSnackbarProvider />
|
||||
|
||||
<MudLayout>
|
||||
<MudMainContent>
|
||||
<MudContainer MaxWidth="MaxWidth.Large" Class="my-16 pt-16">
|
||||
@Body
|
||||
</MudContainer>
|
||||
</MudMainContent>
|
||||
</MudLayout>
|
|
@ -0,0 +1,11 @@
|
|||
@using System.Net.Http
|
||||
@using System.Net.Http.Json
|
||||
@using Microsoft.AspNetCore.Components.Forms
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||
@using Microsoft.AspNetCore.Components.WebAssembly.Http
|
||||
@using Microsoft.JSInterop
|
||||
@using MudBlazor
|
||||
@using Authenticator
|
||||
@using Authenticator.Shared
|
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue