How implement JWT authentication #946
Answered
by
EDamsgaard
raulandresduque
asked this question in
Q&A
-
Hello, I need to connect to a ODATA service, but it implements JWT. According to what I see, only basic and windows authentication are supported. Any way to provide the token to the service? |
Beta Was this translation helpful? Give feedback.
Answered by
EDamsgaard
Apr 8, 2025
Replies: 1 comment
-
ODataClientSettings oDataClientSettings = new ODataClientSettings() |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
raulandresduque
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ODataClientSettings oDataClientSettings = new ODataClientSettings()
oDataClientSettings.BeforeRequest += delegate (HttpRequestMessage message)
{
message.Headers.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken);
}
ODataClient = new ODataClient(oDataClientSettings);