Property Name | Description |
---|---|
Authority | Auth0 authority |
Audience | Auth0 audience |
Permissions | A list of permissions to add to the token |
Add Configuration
{
"Haplo.Authorization.Auth" : {
"Authority": "https://tenantname.au.auth0.com/",
"Audience" : "https://servicename.domain.com/",
"Permissions" : [
"read:servicename",
"delete:servicename",
"create:servicename"
]
}
}
Add Auth0
public void ConfigureServices(IServiceCollection services)
{
...
var auth0Options = Configuration.GetAuth0Configuration()
services.AddAuth0(auth0Options);
...
}
Use Auth0
public void Configure(IServiceCollection services)
{
...
app.UseAuth0()
...
}
// Step 1: Authenticate
dotnet build --configuration release
// Step 2: Pack
dotnet pack --configuration release
// Step 3: Publish
dotnet nuget push "Haplo.Authorization.Auth0.nupkg" -Source "github"
Create GitHub organisation and scan all repos, the Jenkins file should be picked up automatically.