Skip to content

Repository of the ASP Core Web API application that provides authentication for the HaloLive backend.

License

Notifications You must be signed in to change notification settings

HaloLive/HaloLive.Authentication.Service

Repository files navigation

HaloLive.Authentication.Service

Repository of the ASP Core Web API application that provides OAuth2 authentication for the HaloLive backend. If you're looking for information or documentation consult the Documentation Repo that contains design diagrams, endpoint and request/response documentation and information about much more.

To understand how to communicate with this service consult the section on the Authentication and Authorization Scheme specifically.

Setup

To use this project you'll first need a couple of things:

Build

To build the service you can run the Batch script called build.bat or manually publish it in visual studio.

Both will successfully build the application.

Running

To run the application you can use the run.bat, assuming you built it with build.bat and put it in the build directory, or you can run the following command in the console in the publish directory:

dotnet HaloLive.Authentication.Application.dll

Optional Arguments

--usehttps={certPath}: Enables SSL/HTTPS on the web host. This is actually required by the OAuth2 library as it has been configured to reject requests not using HTTPS.

--url={customUrl}: Starts the listener on the specified url and port. For example http://localhost:5000.

Configuration

A test certifcate is provided.

You should have a MySQL database setup with the provided scheme in the sql directory. There is a configuration file, see the example config file. You must configure the location of the certificates as well as the MySQL database connection string. This should go into the generated Build/Config folder. It's recommended certificates go into Build/Certs too.

Another important configuration option is AuthenticationControllerEndpoint and it is expected to be /api/auth according to the design documents and documentation so do not adjust this unless you have good reason to.

Example authserverconfig.json below:

{
	"AuthConfig": 
	{
		"AuthenticationControllerEndpoint": "/api/auth",
		"JwtSigningX509Certificate2Path": "Certs/TestCert.pfx",
		"AuthenticationDatabaseString": "Server=localhost;Database=halolive;Uid=root;Pwd=test;"
	}
}

Example command to run the server with everything enabled:

dotnet HaloLive.Authentication.Application.dll --usehttps=Certs/TestCert.pfx --url=https://localhost:81

Builds

TODO

Tests

TODO: The current appveyor tags are to HaloLive.Library

Windows .NET Debug
master Build status
dev Build status

About

Repository of the ASP Core Web API application that provides authentication for the HaloLive backend.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published