Skip to content

Commit e341339

Browse files
author
Herman A. Toro
authored
Update README.md
1 parent 45769ce commit e341339

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This project borrows heavily from the following repos:
1515

1616
1. [ToDoApi](https://github.com/aspnet/Docs/tree/master/aspnetcore/mobile/native-mobile-backend/sample/ToDoApi) blog post [here](https://docs.microsoft.com/en-us/aspnet/core/mobile/native-mobile-backend)
1717

18-
2. [BareMetalApi](https://github.com/benfoster/BareMetalApi) blog post [here](http://benfoster.io/blog/bare-metal-apis-with-aspnet-core-mvc)
18+
2. [SimpleTokenProvider](https://github.com/nbarbettini/SimpleTokenProvider) blog post [here](https://stormpath.com/blog/token-authentication-asp-net-core)
1919

2020
3. [ASPNetCoreAngular2YoExample](https://github.com/osya/ASPNetCoreAngular2YoExample)
2121

@@ -25,15 +25,27 @@ This project borrows heavily from the following repos:
2525
2. Install PostgreSQL (https://www.postgresql.org/)
2626
3. Update lines 22 and 23 in the file [Models/ApplicationDbContext.cs](https://github.com/hatoro/BareMetalApi/blob/master/src/BareMetalApi/Models/ApplicatonDbContext.cs) with your PostgreSQL user name and password
2727

28-
To run application
28+
**To run application**
2929

3030
1. Download repository
3131
2. Open command prompt and navigate to /src/BareMetalApi
3232
3. Run command "dotnet restore"
3333
* Please create new [issue](https://github.com/hatoro/BareMetalApi/issues/new?title=Restore_Issue&assignee=hatoro&body=My%20Platform:______%20<br/>%20Operating%20System:_______%20<br/>%20DotNet%20Core%20Version:_____) if you are having trouble downloading dependencies
3434
4. Run command "dotnet run"
35-
5. Use Postman to send JSON GET, POST, PUT, and DELETE requests.
36-
* `GET http://localhost:5000/blog/blogarticle`<br/>
35+
* App will compile then run, wait for message `Application started. Press Ctrl+C to shut down.`
36+
5. First Register a User: Use Postman to send a POST request in order to register your first user.
37+
* `POST http://localhost:5000/blog/account/register`<br/>
38+
`{"Email" : "YourName@ok.com", "PasswordHash" : "Abc!"}`
39+
6. Get Security Token: Use Postman to login your user.
40+
* `POST http://localhost:5000/blog/account/login`<br/>
41+
`Body`<br/>
42+
`x-www-form-urlencoded`<br/>
43+
`Email` `YourName@ok.com`<br/>
44+
`Password` `Abc123!`<br/>
45+
7. Use your security tokens to send JSON GET, POST, PUT, and DELETE requests.<br/>
46+
* `GET http://localhost:5000/blog/blogarticle`
47+
`Headers`<br/>
48+
`Authorization` `Bearer eyJhbGc...FULL TOKEN...RrXfOA`<br/>
3749
{<br/>
3850
"Id": 1, <br/>
3951
"ArticleTitle": "How to Dabb", <br/>
@@ -61,6 +73,8 @@ To run application
6173
} <br/>
6274
<br/>
6375
* `GET http://localhost:5000/blog/blogarticle/3` <br/>
76+
`Headers`<br/>
77+
`Authorization` `Bearer eyJhbGc...FULL TOKEN...RrXfOA`<br/>
6478
{ <br/>
6579
"Id": 3, <br/>
6680
"ArticleTitle": "How to Nae Nae", <br/>

0 commit comments

Comments
 (0)