Skip to content

Commit

Permalink
Streamline documentation to make it easier to consume (#57)
Browse files Browse the repository at this point in the history
* Provide more structure

* Streamline documentation

* Remove reference to configuration feature
  • Loading branch information
tomkerkhove authored Aug 2, 2019
1 parent c0facca commit f0c759b
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 37 deletions.
14 changes: 10 additions & 4 deletions docs/features/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@ title: "Logging unhandled exceptions via ASP.NET Core middleware"
layout: default
---

## Logging unhandled exceptions

### Introduction
# Logging unhandled exceptions

The `ExceptionHandlingMiddleware` class can be added to the <span>ASP.NET</span> Core pipeline to log unhandled exceptions that are thrown during request processing.
The unhandled exceptions are caught by this middleware component and are logged through the `ILogger` implementations that are configured inside the project.

### Usage
## Installation

This feature requires to install our NuGet package

```shell
PM > Install-Package Arcus.WebApi.Logging
```

## Usage

To use this middleware, add the following line of code in the `Startup.Configure` method:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@ title: "Adding security information to OpenAPI documentation"
layout: default
---

## Adding OAuth security definition to API operations

### Introduction
# Adding OAuth security definition to API operations

When an API is secured via OAuth, it is helpful if the Open API documentation makes this clear via a security scheme and the API operations that require authorization automatically inform the consumer that it is possible that a 401 Unauthorized or 403 Forbidden response is returned.
The `OAuthAuthorizeOperationFilter` that is part of this package exposes this functionality.

### Usage
## Installation

This feature requires to install our NuGet package

```shell
PM > Install-Package Arcus.WebApi.OpenApi.Extensions
```

## Usage

To indicate that an API is protected by OAuth, you need to add `AuthorizeCheckOperationFilter` as an `OperationFilter` when configuring Swashbuckles Swagger generation:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: "Authentication with certificate via ASP.NET Core authentication filters"
layout: default
---

# Authentication with certificate

The `Arcus.WebApi.Security` package provides a mechanism that uses the client certificate of the request to grant access to a web application.

This authentication process consists of following parts:
Expand All @@ -15,6 +17,14 @@ The package allows two ways to configure this type of authentication mechanism i
- [Globally enforce certificate authentication](#Globally-enforce-certificate-authentication)
- [Enforce certificate authentication per controller or operation](#Enforce-certificate-authentication-per-controller-or-operation)

## Installation

This feature requires to install our NuGet package

```shell
PM > Install-Package Arcus.WebApi.Security.Authentication
```

## Globally enforce certificate authentication

### Introduction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: "Authentication with shared access keys via ASP.NET Core authentication f
layout: default
---

# Authentication with shared access keys

The `Arcus.WebApi.Security` package provides a mechanism that uses shared access keys to grant access to a web application.
This authentication process consists of two parts:

Expand All @@ -12,6 +14,14 @@ This authentication process consists of two parts:
The package allows two ways to configure this type of authentication mechanmism in an <span>ASP.NET</span> application:
- [Global Shared access key authentication](#globally-enforce-shared-access-key-authentication)
- [Shared access key authentication per controller or operation](#enforce-shared-access-key-authentication-per-controller-or-operation)

## Installation

This feature requires to install our NuGet package

```shell
PM > Install-Package Arcus.WebApi.Security.Authentication
```

## Globally enforce shared access key authentication

Expand Down
38 changes: 9 additions & 29 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,18 @@ To install all Arcus.WebApi packages:
PM > Install-Package Arcus.WebApi.All
```

To install the Arcus.WebApi.Logging package:

```shell
PM > Install-Package Arcus.WebApi.Logging
```

To install the Arcus.WebApi.OpenApi.Extensions package:

```shell
PM > Install-Package Arcus.WebApi.OpenApi.Extensions
```
For more granular packages we recommend reading the documentation.

# Features

## Arcus.WebApi.Security

The `Arcus.WebApi.Security` package contains functionality to easily add security capabilities to an API.

- [Shared access key authentication](features/auth/shared-access-key.md)
- [Certificate authentication](features/auth/certificate.md)

## Arcus.WebApi.Logging

The `Arcus.WebApi.Logging` package contains functionality that can be incorporated in API projects to easily add logging capabilities to an API project.

- [Logging unhandled exceptions](features/logging.md)

## OpenAPI Extensions

The `Arcus.WebApi.OpenApi.Extensions` package contains functionality that can be used to easily improve the Open API documentation of an API when making using of Swashbuckle.

- [Exposing security information in Swashbuckle documentation](features/openapi-securitydefinitions.md)
- **Security**
- Authentication
- [Shared access key authentication](features/security/auth/shared-access-key)
- [Certificate authentication](features/security/auth/certificate)
- **Logging**
- [Logging unhandled exceptions](features/logging)
- **OpenAPI**
- [Exposing security information in Swashbuckle documentation](features/openapi/security-definitions)

# License
This is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the web application. But you always need to state that Codit is the original author of this web application.
Expand Down

0 comments on commit f0c759b

Please sign in to comment.