Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing bearer token would result in Authorized #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Missing bearer token would result in Authorized #2

wants to merge 2 commits into from

Conversation

mm98
Copy link

@mm98 mm98 commented Feb 10, 2018

If you didn't supply a bearer token, the action would be authorized. Should always result in a Unauthorized, if not all requirements were met.

If you didn't supply a bearer token, the action would be authorized. Should always result in a Unauthorized, if not all requirements were met.
@davidremus
Copy link

davidremus commented Mar 22, 2018

Hello,
When I use [JwtAuthentication] attribute, response looks like this:

Message":"An error has occurred.","ExceptionMessage":"Method 'ExecuteAsync' in type 'WE_WebService.Middleware.AuthenticationFailureResult' from assembly 'WE_WebService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.","ExceptionType":"System.TypeLoadException","StackTrace":" at WE_WebService.Middleware.JwtAuthenticationAttribute.d__6.MoveNext()\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)\r\n at WE_WebService.Middleware.JwtAuthenticationAttribute.AuthenticateAsync(HttpAuthenticationContext context, CancellationToken cancellationToken)\r\n at System.Web.Http.Controllers.AuthenticationFilterResult.d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()

Why? Thanks!

@UnreachableCode
Copy link

That is an error in your code @davidremus, "Method 'ExecuteAsync' in type 'WE_WebService.Middleware.AuthenticationFailureResult' [....] does not have an implementation".

@sujithm328
Copy link

JwtAuthenticationAttribute.cs(68,46,68,54): error CS1003: Syntax error, ',' expected

I have no idea, why I am getting this error. can you guide me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants