Reputation: 195
Is there any specific rule to select An authentication identifier for Authorization Header? I am confused whether to use GOOG1 OR OAuth OR AWS etc.
Can we make call just by using An authentication identifier followed by Access key Directly in Authorization header?
https://developers.google.com/storage/docs/reference-headers#authorization this link says we can use An authentication identifier ( OAuth | GOOG1 | AWS ) followed by one of the following:
A valid OAuth 2.0 token An access key A signature
I am tring with "GOOG1 AccessKey" but getting following error
<Error>
<Code>InvalidSecurity</Code>
<Message>The provided security credentials are not valid.</Message>
</Error>
Upvotes: 0
Views: 2477
Reputation: 33445
No, you can't use the GOOG1 AccessKey
directly. Using the GOOG1 approach, the Authorization header contains a lot of information all hashed together to form a key. Using OAuth, the header usually contains a specific token.
For GOOG1 (deprecated), the Authorization header creation mechanism can be found here: https://developers.google.com/storage/docs/reference/v1/developer-guidev1#authentication
Using OAuth2 (recommended) it will depend on what scenario your application will be running under. Start by reading the various scenario descriptions, choose the one that applies and follow the links within the appropriate section: https://developers.google.com/accounts/docs/OAuth2#scenarios
Upvotes: 3