You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-3Lines changed: 33 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
-
# SimpleToken Authentication Middleware
1
+
# SimpleToken Authentication
2
2
3
3
This package allows to extract token from authenticated requests and delegate it to an appropriated ISecurityTokenValidator and generate and AuthenticationTicket.
4
4
5
5
## Behavior
6
6
7
7
### Token extraction details
8
8
9
-
This middleware tries to support almost [RFC 6750](http://tools.ietf.org/html/rfc6750) and some licenses based on [GitHub behavior](https://developer.github.com/v3/oauth/#use-the-access-token-to-access-the-api). But does not support Form-Encoded Body Parameter (http://tools.ietf.org/html/rfc6750#section-2.2).
9
+
This tries to support almost [RFC 6750](http://tools.ietf.org/html/rfc6750) and some licenses based on [GitHub behavior](https://developer.github.com/v3/oauth/#use-the-access-token-to-access-the-api). But does not support Form-Encoded Body Parameter (http://tools.ietf.org/html/rfc6750#section-2.2).
10
10
11
11
There are three methods of sending tokens:
12
12
@@ -76,7 +76,37 @@ For example:
76
76
WWW-Authenticate: Bearer
77
77
```
78
78
79
-
## Usage
79
+
## Usage v2
80
+
81
+
It is necessary to register all valid `ISecurityTokenValidator` classes and configure the Authentication service using the `AddSimpleTokenAuthentication` extension method.
82
+
83
+
Example:
84
+
85
+
```csharp
86
+
public class Startup
87
+
{
88
+
public void ConfigureServices(IServiceCollection services)
public void Configure(IApplicationBuilder app, ILoggerFactory loggerfactory) {
103
+
app.UseAuthentication();
104
+
app.UseMvc();
105
+
}
106
+
}
107
+
```
108
+
109
+
## Usage v1
80
110
81
111
It is necessary to register all valid `ISecurityTokenValidator` classes and add the middleware to ApplicationBuilder using `UseSimpleTokenAuthentication`.
Copy file name to clipboardExpand all lines: src/MakingSense.AspNetCore.Authentication.SimpleToken/README.md
+33-3Lines changed: 33 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
-
# SimpleToken Authentication Middleware
1
+
# SimpleToken Authentication
2
2
3
3
This package allows to extract token from authenticated requests and delegate it to an appropriated ISecurityTokenValidator and generate and AuthenticationTicket.
4
4
5
5
## Behavior
6
6
7
7
### Token extraction details
8
8
9
-
This middleware tries to support almost [RFC 6750](http://tools.ietf.org/html/rfc6750) and some licenses based on [GitHub behavior](https://developer.github.com/v3/oauth/#use-the-access-token-to-access-the-api). But does not support Form-Encoded Body Parameter (http://tools.ietf.org/html/rfc6750#section-2.2).
9
+
This tries to support almost [RFC 6750](http://tools.ietf.org/html/rfc6750) and some licenses based on [GitHub behavior](https://developer.github.com/v3/oauth/#use-the-access-token-to-access-the-api). But does not support Form-Encoded Body Parameter (http://tools.ietf.org/html/rfc6750#section-2.2).
10
10
11
11
There are three methods of sending tokens:
12
12
@@ -76,7 +76,37 @@ For example:
76
76
WWW-Authenticate: Bearer
77
77
```
78
78
79
-
## Usage
79
+
## Usage v2
80
+
81
+
It is necessary to register all valid `ISecurityTokenValidator` classes and configure the Authentication service using the `AddSimpleTokenAuthentication` extension method.
82
+
83
+
Example:
84
+
85
+
```csharp
86
+
public class Startup
87
+
{
88
+
public void ConfigureServices(IServiceCollection services)
public void Configure(IApplicationBuilder app, ILoggerFactory loggerfactory) {
103
+
app.UseAuthentication();
104
+
app.UseMvc();
105
+
}
106
+
}
107
+
```
108
+
109
+
## Usage v1
80
110
81
111
It is necessary to register all valid `ISecurityTokenValidator` classes and add the middleware to ApplicationBuilder using `UseSimpleTokenAuthentication`.
0 commit comments