OCI API GW | “Token authorization scheme could not be determined”


Should you are composing a JWT on the fly in a custom function (fn-project) such as the following code in golang:

...
b = fmt.Sprintf("Bearer %s", r.Token) // r.Token is like "eyJ4NXQ..."
log.Print(b)
...

And, apparently, your token looks like fine in the logs as follows:

But the APIGW, in the execution logs …

… is tracing the following entry:

Token authorization sccheme could not be determined

Then, just double check whether the white space in the expression “Bearer %s” is really a white space, because if, for example, it is a tabulator, you’ll get the error mentioned.

Hope this helps!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.