Tokens are issued to clients by an authorization server with the approval of the resource owner. The client uses the access token to access the protected resources hosted by the resource server.
Questions tagged [bearer-token]
1416 questions
12
votes
2 answers
How do I pass authentication bearer tokens to HTTP methods in django.test.Client?
I am writing tests for endpoints which requires bearer token authentication, but I am getting errors trying to pass authentication errors to HTTP methods like client.post(url,data,**auth_header)
I have tried using both…

Christopher Stephenson
- 492
- 11
- 20
12
votes
2 answers
.NET Framework MVC and Web Api Auth JWT
I have a project in MVC using .NET Framework v4.7 with some WebApi on it. What I need to know is how to use a middleware between then to authorize a JWT for HTTP requests and MVC Action requests.
I've searched everywhere looking for a solution…

Pedro Lopes
- 131
- 1
- 5
12
votes
6 answers
OAuth 2.0 Bearer-Tokens vs. Mac-Tokens. Why not using Mac-Tokens?
I searched for other questions in this topic but i found not an answer to exatly this. So tell me if i'm wrong.
I'm new in this topic and you can correct me with pleasure. Here is what i think at the actual moment:
I surfed arround the web for 2…

Daniel
- 486
- 4
- 19
11
votes
2 answers
How to Pass Authorization Header from Swagger Doc in Python Fast API
I am trying to pass authorization header using Documentation page, similar to this page:
Since, the documentations are automatic generated in Fast API, I am having hard time trying to figure this out. I followed this page…

kaounKaoun
- 601
- 1
- 9
- 21
11
votes
4 answers
Angular 4 image async with bearer headers
My task is to make async image requests with auth headers. I have image paths like this:
And I need to Add Bearer Token to header for such requests. Page contains many images, so ajax requests are don't fit.
Have no idea…

Katya Makeeva
- 139
- 1
- 1
- 5
11
votes
1 answer
Yii2 Rest API Bearer Authentication
I've made a Yii2 REST API. With the API you can get a list of cars. Now I want to use the Bearer Authentication to protect the API. But I don't know how it works.
First of all. I set up the authenticator in the behaviors method of my…

Wouter den Ouden
- 1,523
- 2
- 17
- 44
11
votes
1 answer
What's the default OAuth AccessTokenFormat implementation in OWIN for IIS host?
Web API 2 OWIN Bearer token authentication - AccessTokenFormat null?
The default /Token endpoints works fine and I could get token from there,
but I need to use the AccessTokenFormat.Protect method on a ticket to generate accessToken for…

Wei
- 422
- 1
- 7
- 15
10
votes
1 answer
Quarkus Swagger-UI Authorization
Im currently working with Quarkus and Swagger-UI as delivered by quarkus-smallrye-openapi.
We have OIDC from Azure AD as security, which is currently not supported by Swagger-UI (see Swagger-Docs), so I can't add the "real" authorization to…

Urr4
- 611
- 9
- 26
10
votes
3 answers
How to customize bearer header keyword in asp.net core for JwtBearer and System.IdentityModel.Tokens.Jwt?
Using using Microsoft.AspNetCore.Authentication.JwtBearer; I have been unable to figure out how to change the "Bearer " key in the header to something else, in this case I'd like it to be "Token ".
Startup.cs
services.AddAuthentication(x =>
…

lastlink
- 1,505
- 2
- 19
- 29
10
votes
2 answers
Bearer token getting too big
In an application I'm building, we're using JWT tokens as OAuth Bearer token.
Say we have a resource collection called things, addressable by thing ID, eg. things/1, things/44, etc.
Currently, whenever someone request an access token with the scope…

romeovs
- 5,785
- 9
- 43
- 74
9
votes
1 answer
ASP Net Core IdentityServer, "The issuer is invalid" on production environment
I'm trying to deploy on production (AWS Elasticbeanstalk server) a simple asp net core project that use IdentityServer; my test project is basically the React.js template of Visual Studio 2019 with enabled authentication.
In development all works…

blow
- 12,811
- 24
- 75
- 112
9
votes
2 answers
How do I set authorization bearer header in C++ curl code? I'm getting insufficient authorization, eventhough it works at the command line
I am trying to get C++ code that uses the curl.h library to make curl requests that require the setting of the Authorization: Bearer header. I am using Linux Mint 18 (Ubuntu).
I have made this curl request from the command line, and it works, it…

user904542
- 6,965
- 5
- 20
- 28
9
votes
0 answers
Why is Safari not clearing the Authorization header after HTTP Basic login (and then not letting me overwrite it with a Bearer token later)?
We have a staging server set up that uses HTTP Basic authentication for access which is independent of the user functionality on the site. Once the stage is accessed, I log in with some credentials (which do not use HTTP Basic) and I can proceed to…

Brandon
- 4,491
- 6
- 38
- 59
9
votes
1 answer
Using multiple authentication schemes in ASP.NET Core
I have Web API developed using ASP.NET Core and I need to be able to use both Basic and Bearer authentication schemes for the same service.
For some reason it does not work: it always considers the call as a bearer one.
Here's my code:
This are the…

J.Doe
- 1,701
- 2
- 10
- 4
9
votes
1 answer
Proper way to test authenticated methods (using bearer tokens) in C# (web api)
I have a Web API with tons of methods that all require a bearer token to be present in order to be used. These methods all extract information from the bearer token.
I want to test whether the API is properly populating the bearer token upon its…

fdmillion
- 4,823
- 7
- 45
- 82