cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

browser monitor - javascript event - bearer token

_r_k_
Participant

we are using browser monitor with recorded clickpath for web application

application uses bearer token for all requests (authorization request header)

recorded clickpath itself works without problems

 

we would like to add as last event, synthetic javascript event

and within (javascript event) request application, but are wondering if there is a way how to access bearer token (because without bearer token all requests from javascript event are unauthorized)

4 REPLIES 4

ChadTurner
DynaMight Legend
DynaMight Legend

@_r_k_ were you able to get a solution to this?

 

-Chad

in our case no, usually bearer token is accessible in some form in browser storage, but we weren't able to find it or to construct/gather it in any way...

it depends on framework and implementation of framework how token is used... so good luck, but there isn't official or universal solution

and token isn't only hurdle, content security policy, certificates, file download, local storage for synthetic monitoring, flow control, dependency actions, reexecutions, conditions in action flow ... based on my experience, if you are looking for bearer token, current synthetic monitoring probably isn't ideal, or you should rething what you are doing

HannahM
Dynatrace Leader
Dynatrace Leader

It's not possible to read headers from a page using JavaScript. I take it there are no options to add it as a hidden field etc that JS would have access to? Since you're unable to access the page without it a fetch to the same page wouldn't be an option. Could you just do what you want in an HTTP Monitor?

Synthetic SME and community advocate.

Featured Posts