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
9
votes
5 answers
Rest Assured Bearer authentication
I am new to using Rest Assured,Java and Api testing so please be gentle with me. When I use rest assured to test an api that uses Bearer authentication the tests fail resulting in:-
java.net.ConnectException: Connection refused: connect
I know the…

Klugsman
- 91
- 1
- 1
- 4
9
votes
1 answer
webapi owin use token and cookie
I have two main projects in my Web application:
WebApi project as back-end to serve authentication and authorization for the Web project,using OWIN 2 with bearer tokens.
Web project uses Angularjs.
The Web project works as expected(authentication…

A.Akram
- 412
- 5
- 22
9
votes
3 answers
Authorization header not making it through in Codeception API testing
I am attempting to test my Laravel 4 REST API using Codeception, but when I try to send through my Authorization header (using the $I->amBearerAuthenticated() function of the REST module) it is not making it through to the eventual request.
From…

Ben Slinger
- 267
- 4
- 14
9
votes
1 answer
Where should I inject Bearer tokens into $http in AngularJS?
After the user's credential has been accepted I fetch the Bearer token [1] and update the default headers:
$http.defaults.headers.common.Authorization = "Bearer #{data.access_token}"
This is done at the end of the $scope.signIn() method. Will…

martins
- 9,669
- 11
- 57
- 85
8
votes
1 answer
x-auth-token vs x-access-token vs Authorization in JWT
I have seen different solutions when building JWT-based authentication systems between react and node. There are many examples, and many of them use different headers.
What is the difference between…

Seppo
- 137
- 2
- 9
8
votes
1 answer
Xamarin App Crashes On Launch After Not Being Opened For A Day
My Xamarin project runs a simple token identification check on launch, which is where I believe it is being held up. The odd part is that it only crashes after not being opened for an extended period of time, like after 24 hours. No error is shown…

AcePilot10
- 178
- 1
- 12
8
votes
1 answer
Request API node js using bearer token
I tried doing the following:
request({
url: 'https://vdms-dev.clientsolve.com/evoDMDev/api_event.php',
headers: {
'Authorization': 'Bearer 71D50F9987529'
}
}, function(err, res) {
console.log(res);
});
The log is showing…

Ratri
- 337
- 1
- 7
- 21
8
votes
1 answer
How to create a bearer token with js (node.js)?
After searching the web, I found there are many posts and modules help parse bearer token, but I didn't found any help create one.
How should I properly generate a bearer token in node.js server?

Yao Zhao
- 4,373
- 4
- 22
- 30
8
votes
1 answer
Why do we prefer Authorization Header to send bearer token to server over other techniques like URL encoding
Why Authorization header is mostly used to send a bearer token to server? Why don't we send our authorization token as URL parameter or post it as json payload with the request body?

mdnajimahmed
- 124
- 2
- 9
8
votes
1 answer
Custom Error message using passport Bearer
I'm using passport to secure my API.
I kind of struggle to understand how i'm supposed to send back custom message in case of error and i'm hoping to find an answer here.
Here is what i did:
A route (server.js):…

bottus
- 883
- 2
- 13
- 32
8
votes
1 answer
Generate a secure token for api access
I need to generate a secure token for access to an api. User will auth and on successful auth I will need to generate a token.
Important: I do have a requirement that I need to be able to revoke a users access to the api at any time.
Option 1:
I…

lostintranslation
- 23,756
- 50
- 159
- 262
8
votes
2 answers
OAuth bearer token not working
I have a minimal setup of an auth-provider, which sets claims-identity
public class SimpleAuthorizationProvider : OAuthAuthorizationServerProvider
{
public override async Task ValidateClientAuthentication(OAuthValidateClientAuthenticationContext…

harishr
- 17,807
- 9
- 78
- 125
8
votes
2 answers
401 Unauthorized when sending ajax request to web api
I've been scratching my head at this for 2 days now. I am using WebAPI version 2.2 and I am using CORS. This setup works on the server side, I am allowed to get authorized content from my web client server code but getting unauthorized in my ajax…

Dale Marshall
- 1,137
- 7
- 20
- 42
8
votes
1 answer
WebApi OAuth UseOAuthBearerAuthentication gives "Sequence contains more than one element" error
I configured my WebApi OAuth 2.0 by these lines:
app.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions
{
Provider = new OAuthBearerAuthenticationProvider(),
});
app.UseOAuthBearerTokens(OAuthOptions);
But it…

Mahmoud Moravej
- 8,705
- 6
- 46
- 65
8
votes
1 answer
Yesod Sessionless Authentication
I am using Yesod to build a purely REST backend for an Angular based application. This application will be hosted separately with a CDN and will need to connect to the Yesod api as well as a few others. Is there a way to have Yesod accept a Bearer…

Andrew Rademacher
- 335
- 4
- 12