mirror of
https://github.com/fergalmoran/next-auth-aspnetcore-adapter.git
synced 2025-12-22 17:38:17 +00:00
Initial
This commit is contained in:
13
.editorconfig
Normal file
13
.editorconfig
Normal file
@@ -0,0 +1,13 @@
|
||||
# Editor configuration, see http://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
A Next Auth adapter for using ASP.Net Core as your identity provider
|
||||
|
||||
An example API server can be found at [Damien Fowler](https://github.com/davidfowl)'s [IdentityEndpointsSample](https://github.com/davidfowl/IdentityEndpointsSample)
|
||||
An example API server can be found at [David Fowler](https://github.com/davidfowl)'s [IdentityEndpointsSample](https://github.com/davidfowl/IdentityEndpointsSample)
|
||||
|
||||
2559
pnpm-lock.yaml
generated
Normal file
2559
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
10
tests/IdentityEndpointsSample/index.test.ts
Normal file
10
tests/IdentityEndpointsSample/index.test.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import {fixtures} from "../fixtures";
|
||||
import {AspNetIdentityAdapter} from "../../src";
|
||||
import {runBasicTests} from "../.";
|
||||
|
||||
runBasicTests({
|
||||
adapter: AspNetIdentityAdapter(fixtures.baseUrl),
|
||||
fixtures,
|
||||
}).then(r => {
|
||||
console.log('IdentityEndpointsSample', 'Tests complete', r)
|
||||
});
|
||||
21
tests/IdentityEndpointsSample/test.sh
Executable file
21
tests/IdentityEndpointsSample/test.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CONTAINER_NAME=next-auth-aspnetcore-adapter-test
|
||||
CONTAINER_PORT=8080
|
||||
IMAGE_NAME="fergalmoran/aspnet-identity-sample"
|
||||
|
||||
echo "Cleaning up"
|
||||
docker stop $CONTAINER_NAME
|
||||
docker rm $CONTAINER_NAME
|
||||
|
||||
echo "Spinning up API endpoints"
|
||||
docker run -d --rm \
|
||||
--name $CONTAINER_NAME \
|
||||
-p ${CONTAINER_PORT}:8080 \
|
||||
$IMAGE_NAME
|
||||
|
||||
|
||||
echo "Waiting for container start..." && sleep 1
|
||||
|
||||
jest ./index.test.ts --forceExit
|
||||
docker stop $CONTAINER_NAME
|
||||
8
tests/fixtures.ts
Normal file
8
tests/fixtures.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export const fixtures = {
|
||||
baseUrl: 'http://localhost:8080',
|
||||
user: {
|
||||
username: "fillmurray",
|
||||
email: "fill@murray.com",
|
||||
password: "FillMurray@12345!"
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user