Coder Social home page Coder Social logo

cornflourblue / aspnet-core-jwt-authentication-api Goto Github PK

View Code? Open in Web Editor NEW
275.0 24.0 124.0 7 KB

ASP.NET Core 2.2 JWT Authentication API

Home Page: http://jasonwatmore.com/post/2018/08/14/aspnet-core-21-jwt-authentication-tutorial-with-example-api

License: MIT License

C# 100.00%
aspnetcore aspnetcore22 aspnetcore2 aspnet aspnetcorewebapi jwt-authentication

aspnet-core-jwt-authentication-api's Introduction

aspnet-core-jwt-authentication-api's People

Contributors

cornflourblue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aspnet-core-jwt-authentication-api's Issues

unsupported media type

I tried to test the app running

$ curl -d "username=test&password=test" -X POST http://localhost:4000/users/authenticate
{"type":"https://tools.ietf.org/html/rfc7231#section-6.5.13","title":"Unsupported Media Type","status":415,"traceId":"0HLMEPV7RSATF:00000001"}

Same error if I try with vscode rest client like this:

POST http://localhost:4000/users/authenticate
accept: application/json
content-type: application/x-www-form-urlencoded

username=test
&password=test

I get:

HTTP/1.1 415 Unsupported Media Type
Connection: close
Date: Thu, 02 May 2019 07:36:26 GMT
Content-Type: application/problem+json; charset=utf-8
Server: Kestrel
Transfer-Encoding: chunked

{
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.13",
  "title": "Unsupported Media Type",
  "status": 415,
  "traceId": "0HLMEPV7RSATG:00000001"
}

I think it would be very useful to add to the docs a curl command line to test the app

HTTP ERROR 404

Hi,

When I run your sample I got a HTTP ERROR 404

The browser open at : http://localhost:58267/

I have also try with postman and everything looks empty ! I have put breakpoint but they don't stop !

Do you have a C# sample for the client too ? It will be helpful :-)

Issue about CreateToken

hi,the demo can run successful.But when i change appsettings.json file about AppSettings.And i change the Secret string "THIS IS USED TO SIGN AND VERIFY JWT TOKENS, REPLACE IT WITH YOUR OWN SECRET, IT CAN BE ANY STRING" into any word. Then i call the api Authenticate,It is brokes down in method "tokenHandler.CreateToken(tokenDescriptor)",and the wrong info is IDX10603: Decryption failed. Keys tried: '[PII is hidden]'.
Exceptions caught:
'[PII is hidden]'.
token: '[PII is hidden]'
Parameter name: KeySize

Can you please tell me,how to get over this issue.Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.