Questions tagged [bearer-token]

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.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
40 views

Passport: access a specific route only if the user is not logged in

I'm using Passport for a work project. I have a "generic" token available and thanks to it it is possible to access a specific route without the user having logged in. For example, to make ...
a_l_e_x's user avatar
  • 406
1 vote
1 answer
56 views

Can I set an IssuerSigningKey with Identity API Endpoints in a .NET 8 Web API using AddBearerToken?

I've developed a web API using the new Identity API endpoints feature. In my Next.js frontend, I've implemented protected pages, accessible only to authenticated users. To enable user access to these ...
Dikembe Mutombo's user avatar
0 votes
1 answer
25 views

Best way to use access tokens for authentication and authorization

What is the best approach to use personal access tokens for authentication and authorization of a mobile app? What I do is on login I generate a token valid for 30 mins. On each request, all the ...
alex's user avatar
  • 63
2 votes
2 answers
131 views

Custom token validator not working in .NET 8

Today I was checking if I can migrate my app to .NET 8. At first everything was ok by when I tried to log in, I get following error in the console: Failed to validate the token. Microsoft....
Artur Michajluk's user avatar
1 vote
0 answers
23 views

Can't access retrieve username and password through req.headers.authorization in SwaggerUi

I am writing the backend using nodejs and express. I have set up the swagger for api documentation. I use the bearer authentication method with the token and it's working in the swagger when put my ...
VoTheGreat's user avatar
0 votes
1 answer
15 views

MicrosoftOnline Bearer Token retrieval works on one server but not the other

I have a service that has been running successfully (and still is) on a Windows server for several years. The customer wanted to double capacity so wish it to run on a second Windows server. However, ...
MarkEMarkEMark's user avatar
0 votes
0 answers
34 views

SendGrid authentication with bearer token

I am trying to figure out how to secure a send grid api post request in my nextjs application. I have the following: export const sendEamil = async <T>(data: T) => await fetch("/api/...
Aessandro's user avatar
  • 5,597
5 votes
2 answers
192 views

Issue with Using JWT for Authentication in ASP.NET Core MVC

I'm encountering an issue while implementing authentication using JSON Web Token (JWT) in ASP.NET Core MVC. I have an ASP.NET Core API with a login endpoint that returns a JWT in response to user ...
micex's user avatar
  • 90
0 votes
0 answers
34 views

Adding header to actix web request via Swagger

I'm currently using utoipa for my Swagger UI and actix_web_httpauth to authorize my requests. I added ("authorization" = String, Header, description = "JWT") to my Swagger params ...
Jan's user avatar
  • 153
0 votes
0 answers
23 views

JwtSecurityTokenHandler.ValidateToken throws StackoverflowException

I have the following configuration for my .Net Framework API : public void Configuration(IAppBuilder app) { ... app.UseJwtBearerAuthentication( new ...
AnthonyDa's user avatar
  • 513
0 votes
0 answers
24 views

How do i authorize using a token that is generated on a different rest server in ASP.NET Core 8

I am working on an ASP.NET Core 8 Web API project. There is another existing REST server, call it OldServer; if you pass a user name and password to its url at /api/token, it will return a JWT token. ...
WebBoy's user avatar
  • 61
-1 votes
0 answers
29 views

How to create secured client app authentication for Rest API?

I have a question about authenticating the client application in the API. I've created an API using ASP.NET Core and implemented the bearer token authentication (so that each request must have a JWT ...
Shaka's user avatar
  • 9
0 votes
0 answers
46 views

pass token from one function to another function in Nodejs

I am having an issue where I can't get to take the token given to me in the getAuthTokenForCCA function to pass the token to the getInventoryFromCCA function without having to hardcode the token I ...
Stella Ezenwoye's user avatar
0 votes
1 answer
37 views

Cask (undertow) server configuration for bearer token auth with CORS

I have configuration my Cask undertow server for CORS like so: class CorsHandler(dispatchTrie: DispatchTrie[Map[String, (Routes, EndpointMetadata[_])]], mainDecorators: Seq[Decorator[...
Locust5304's user avatar
0 votes
0 answers
34 views

Authentication to Google Chat API for deployed function

I wrote a Google Cloud Function, which sends a message, to a Google Chat using Webhook. The script is working fine and the messages are arriving while testing the function. If I deploy the function I ...
jbx's user avatar
  • 13
0 votes
1 answer
92 views

How to request a bearer token directly from SQL Server using a certificate

I am tasked with writing a SQL Server stored procedure to request a bearer token from a vendor site using their API. The vendor site issued me two files of type .cer and .key. When I import these ...
Lee M's user avatar
  • 1
0 votes
0 answers
49 views

ASP .NET Web Api create + validate PASETO token

I've tried all sorts of things, but I can't seem to figure out a way to work out how to make the token creator in PasetoService.cs work in harmony with the token validator in Startup.cs. It also gives ...
Kuno van Noort's user avatar
0 votes
1 answer
32 views

Java 8 - POST request with Bearer token fails with 401

Please note that I must use java 8 for this work. Initially do a POST for authentication to the middleware Gateway and get accessToken. Using the same access token I do a POST to the service end ...
user1902124's user avatar
0 votes
0 answers
39 views

C# App running on IIS Server to have OKTA Authentication with windows Auth as true

Runs app in C# running on IIS Server but need to have OKTA Authentication with windows Auth as true and Anonymous Auth as false. I can get it working with Windows as false, how to I achieve OKTA ith ...
user922540's user avatar
1 vote
1 answer
45 views

Azure OIDC and Bearer token in .NET web app

I want to use OAuth and Bearer token with Azure to authenticate requests but I am failing. OAuth works, when I send a request to a controller route that has a [authorize] attribute I get prompted to ...
Node.JS's user avatar
  • 1,089
0 votes
1 answer
29 views

Unable to add bearer token in API client

I am trying to add bearer token in the API request but token not added. Here is my code: object APIClient { val client: ApiInterface get() { val httpLoggingInterceptor = ...
Techno World's user avatar
0 votes
0 answers
65 views

How to validate a JWT in a server generated using openapi-generator

I have written an OpenAPI specification for an api in a YAML file. The operations require authentication using a JWT that is sent as a bearer token. When I generate a server that uses eg. Java Spring (...
Kivvil's user avatar
  • 211
0 votes
0 answers
276 views

ASP.NET Core Identity with JWT

Problem: I have implemented aspnet identity using JWT token authorisation I have followed all instructions which has been presented and for some reason I cannot get it to work and cannot see any ...
Green Bicycle's user avatar
0 votes
0 answers
17 views

Exposing an image API to the public via a domain subdirectory (Apache2, bearer token authentication)

I own an API that retrieves images from a middleware. It requires a bearer token to anthenticate. This token is stored in a .env file. I am exposing it to the Internet (without authentication) via an ...
BieberFantasy's user avatar
0 votes
1 answer
55 views

Why making API call to Confluence with bearer token does not work in Python?

I have some strange issue with making an API call using Python's requests. I have looked at similar questions but they all point to the solution I have already implemented. I am trying to access ...
Tomasz's user avatar
  • 33
0 votes
0 answers
25 views

How can I read auth token from external website (where I logged in)?

There's a Nike website where I have personal account. When I interact with website I can get auth token in Network tab. That's in request headers. Business scenario: The user visit my website -> ...
George Glocker's user avatar
0 votes
0 answers
42 views

Get error when I try to retrieve graph token from Microsoft online graph url

I am trying to retrieve the token for Microsoft graph online URL the request is successful when I run it in Postman. Here is the link I have used in Postman: https://login.microsoftonline.com/{...
user2140740's user avatar
0 votes
1 answer
313 views

Token Signature Validation Failing Reported that Token Does Not Have a Kid

In setting up a web service to take in a token generated from a B2C call to https://login.microsoftonline.com/{tenant Id}/oauth2/v2.0/token I keep getting the IDX10503 error. I generate the token in ...
ΩmegaMan's user avatar
  • 29.9k
3 votes
2 answers
107 views

Laravel Passport Does Not Authenticate User After Receiving Access Token

I'm using Laravel 10 and Laravel Passport and in this project, I tried registering new users like this: public function register(Request $request) { $request->validate([ '...
Pouya's user avatar
  • 161
0 votes
0 answers
67 views

Getting error while validating token when there are multiple audience in the token

I am getting an error while validating the token. This error occurs when we have multiple audiences in the token. "Message": "Jwt10303: Audience validation failed. jwt.Audience: '["...
Saurabh's user avatar
  • 15
0 votes
0 answers
83 views

How to connect gRPC server with bearer token using client.connect() method? in k6

while connecting to the gRPC server I was not able to pass the bearer token I tried to pass it as a key-value pair in an object {authorization: bearer "token"} but an error occurred "no ...
GTAGTA5's user avatar
-1 votes
1 answer
46 views

How to grant client credential OAuth 2.0 in slim PHP

I am new and was trying to study API using slim PHP, recently I was introduced to Postman and found out you can test API prior to code which was interesting, and then I got more deep into it and found ...
jameela's user avatar
0 votes
0 answers
35 views

How to store an authentication token client-side?

Goal As a client application i want to store my session-token i received from the Server after a successful authentication so next time i dont have to be bothered again with authentication. Should i ...
Sven Rademakers's user avatar
1 vote
1 answer
51 views

Authenticate in ASP.Net Core using API-Token

I am currently using JwtBearer as the authentication scheme, meaning users have to log in using their username and password and receive a token which authenticates them for a while. Now I need to make ...
TaCqz's user avatar
  • 11
0 votes
0 answers
78 views

C# OAuth Bearer Token - "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters

"The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters." I am getting Bearer ...
msbyuva's user avatar
  • 3,477
1 vote
1 answer
70 views

Generate a Power BI Embed Token via .NET App to enrich iFrame Link for Power BI Embedded vizualisation for Customers

A report should be displayed to customers with RLS in an existing web application via iFrame embedding. The customers authenticate themselves when logging into the web application via a B2C AAD and we ...
Jan Herrmann's user avatar
0 votes
0 answers
28 views

In Azure, what is the best way to set up Authentication that is a simple Uname/Password in, bearer token out flow?

I come from AWS land, and there it's quite simple to set up cognito to manage users and take in a username/password, authenticate it, and return a token. I'm expecting to send a username and password ...
Clayton's user avatar
0 votes
0 answers
73 views

ASP.NET Core - "No authenticationScheme was specified, and there was no DefaultChallengeScheme found" Error

I'm working on an ASP.NET Core project where I'm trying to implement JWT authentication and authorisation. However, I keep running into the following error: System.InvalidOperationException: No ...
brendan minder's user avatar
0 votes
1 answer
99 views

Support multiple authentication types, both IdentityServer and Jwt token

A central service has IdentityServer as the current authentication method which needs to stay intact. Now another Jwt bearer token needs to be supported. It seems possible to have the two token ...
Ville's user avatar
  • 119
0 votes
0 answers
13 views

Issue retrieving token bearer in ReactJS

being new to ReactJS I'm having some issues adding authentication using token bearer in my app. After a login the user should be redirected to the main page and the returned token is stored in order ...
Mickael Maujean's user avatar
1 vote
1 answer
252 views

How to validate bearer token in Python

I have used below code to get the token: def get_token(): try: r = requests.post( "https://login.microsoftonline.com/" + config_data['TENNANT'] + "/...
S Andrew's user avatar
  • 5,934
1 vote
0 answers
364 views

How to read the new bearer token in net 8 client app (maui blazor in my case)

I want to read the bearer token given by the .net 8 new identity api out of the box endpoints, but they are not JWT. In the past I used the following code to do this: var jsontoken = handler....
Dani's user avatar
  • 11
0 votes
0 answers
40 views

How get token from HTTPBasic form in fastapi

It is my first fastapi app so it might be a very beginner question but several days googling did not return any result. We are developing a set of APIs using fastapi(0.103.1) and we registered our ...
khoshahmad's user avatar
0 votes
1 answer
82 views

azure AADB2C error when trying to authenticate using request

I have the following code and I am trying to authenticate in azure (Azure Active Directory B2C) using python request. However, I am getting the following error as below. s_headers = { 'authority': ...
samronaldo309's user avatar
-1 votes
1 answer
229 views

How to Get the Value of an HTTPBearer Token Passed as Dependency in FastAPI?

Trying to learn the basics of authorisation using java-web-tokens from this github repository. Reproducing the relevant part here for easy reference (comments mine). @app.post("/posts", ...
Della's user avatar
  • 1,304
0 votes
1 answer
53 views

How to get a Authorization Bearer Token from Response Headers with Axios?

The backend is sending me a Bearer token inside the response headers and I want to store it inside the redux store as most of the APIs require that token to be sent back inside the headers. I'm ...
Oliver's user avatar
  • 325
0 votes
1 answer
155 views

Spring security Jwt bearer token encoding/decoding error

When trying to validate a jwt bearer token from a user I'am getting a 403 error and the headers are telling me that my token has insufficent scope.I'am wondering where I went wrong in the process of ...
abdulai bah's user avatar
0 votes
1 answer
203 views

Blazor login page jwt bearer token and authorizing

@page "/login" @using System.Net.Http @using System.Net.Http.Json @using System.Text.Json @inject IHttpClientFactory HttpClientFactory @inject IJSRuntime JSRuntime <h3>Login</h3>...
Yunus Emre Ceylan's user avatar
-1 votes
1 answer
131 views

Is there any way to get a bearer token for each user in Azure and use for authentication against a web API?

It seems a very simple question and hard to imagine Microsoft does not have a solution for it but after Googling for days I cannot find an answer for it, at least not a simple answer. I am developing ...
khoshahmad's user avatar
0 votes
1 answer
102 views

Passport-azure-ad MSAL Using BearerStrategy gives error

Client(React Js) - @azure/msal-react, @azure/msal-browser Server(Express Js) - Passport-azure-ad var options = { identityMetadata:"https://login.microsoftonline.com/<tennant-id>/v2.0/....
Vishal Jaiswal's user avatar

1
2 3 4 5
29