Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit de22de3

Browse files
author
Piotrek
committed
Updated readme
1 parent fb9e672 commit de22de3

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

templates/Angular2Spa/README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,25 @@ If you see this error:
22

33
`An unhandled exception has occurred: Call to Node module failed with error: Prerendering failed because of error: Error: Cannot find module [...]\JavaScriptServices\templates\Angular2Spa\ClientApp\dist\main-server`
44

5-
Check out [this issue](https://github.com/aspnet/JavaScriptServices/issues/99). Execute command `webpack --config webpack.config.vendor.js`
5+
Check out [this issue](https://github.com/aspnet/JavaScriptServices/issues/99). Execute command `webpack --config webpack.config.vendor.js`
6+
7+
To receive auth token using REST API client, you have to send POST request to `/api/connect/token` with similar x-www-form-urlencoded body:
8+
```
9+
username:a@b.c //example username
10+
password:12345 //example password
11+
grant_type:password
12+
scope:openid profile email phone
13+
```
14+
15+
Token is stored in localStorage
16+
17+
For authentication, I'm using [OpenIddict](https://github.com/openiddict/openiddict-core).
18+
19+
[More about OpenId](http://connect2id.com/learn/openid-connect)
20+
21+
[More about grants, scopes and other values used in api requests](https://tools.ietf.org/html/rfc6749)
22+
23+
To access Controller that requires authentication, send request with `Authorization` header:
24+
```
25+
Authorization: Bearer [paste_token_here]
26+
```

0 commit comments

Comments
 (0)