Basic token authentication
This commit is contained in:
parent
70cb740715
commit
9cb901873d
5 changed files with 100 additions and 1 deletions
26
test/Nyanlabs.Umogen.CoreTests/AuthTests.cs
Normal file
26
test/Nyanlabs.Umogen.CoreTests/AuthTests.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Nyanlabs.Umogen.Core;
|
||||
|
||||
namespace Nyanlabs.Umogen.CoreTests;
|
||||
|
||||
public class AuthTests
|
||||
{
|
||||
[Fact]
|
||||
public async Task TestTokenVerification()
|
||||
{
|
||||
// Given
|
||||
var rootDir = Environment.CurrentDirectory.Replace("test/Nyanlabs.Umogen.CoreTests/bin/Debug/net8.0", "");
|
||||
|
||||
UmoEngine eng = new(Path.Combine(rootDir, Core.Umogen.DEFAULT_API_KEY_FILE));
|
||||
|
||||
// When
|
||||
var result = await eng.ValidateKey();
|
||||
|
||||
// Then
|
||||
Assert.True(result);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue