Hey guys, How can I remove `Bearer` keyword from `...
# ktor
v
Hey guys, How can I remove
Bearer
keyword from
authorization
token in Ktor. I don't want to use these keyword in my api call. I think it call authorization header, but I am not sure. Thanks
Copy code
install(Auth) {
    bearer {
        loadTokens {
            BearerTokens("u_b6I4kItp", "xyz111")
        }
    }
}
c
This is part of the protocol to define the authentication method. You can have a look at the definition over here https://www.rfc-editor.org/rfc/rfc1945#section-11 and for OAuth2 https://www.rfc-editor.org/rfc/rfc6750#section-2.1
v
Hey @Chrimaeon thanks for reply. I got it, Is there any other way to remove that header bcoz I am getting 401 in my api call
c
You can create the header field on your own without the „Plugin“ then you have full control over the value. There should be a „Default Headers“ plugin that you should be able to use.
v
Okk I'll try. thanks for guidance.