google / google/jsontoken

Header field 'typ' is never set if createheader called.

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
21
Forks
16
Avg merge
2d 2h
Merged PRs (30d)
2

Description

```
What steps will reproduce the problem?
1. Instantiate similar to: JsonToken jsonToken = new JsonToken(signer);

2. Fill the object out;

3. Call jsonToken.serializeAndSign();

What is the expected output? What do you see instead?

Should get something like: {"alg":"RS256","typ":"JWT"}

But instead get: {"alg":"RS256"}

What version of the product are you using? On what operating system?

Using trunk (1.0 is similar).

Please provide any additional information below.

Google specifies that for obtaining access tokens on service accounts the "typ"
field must exist. See
https://developers.google.com/accounts/docs/OAuth2ServiceAccount#formingheader
for details.

```

Original issue reported on code.google.com by `tdh...@gmail.com` on 16 May 2013 at 9:42

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.