Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update test tokens #971

Merged
merged 1 commit into from
Nov 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class IdTokenVerifierTest extends TestCase {
"https://www.googleapis.com/oauth2/v1/certs";

private static final String SERVICE_ACCOUNT_RS256_TOKEN =
"eyJhbGciOiJSUzI1NiIsImtpZCI6ImVkMzZjMjU3YzQ3ZWJhYmI0N2I0NTY4MjhhODU4YWE1ZmNkYTEyZGQiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiJodHRwczovL2ZpcmVzdG9yZS5nb29nbGVhcGlzLmNvbS8iLCJhenAiOiIxMDc2OTIyMjkyNzUyMzY5MDMyNzgiLCJleHAiOjE2NjUwODkxMjYsImlhdCI6MTY2NTA4NTUyNiwiaXNzIjoiaHR0cHM6Ly9hY2NvdW50cy5nb29nbGUuY29tIiwic3ViIjoiMTA3NjkyMjI5Mjc1MjM2OTAzMjc4In0.0lo5y5mQ6hhcQSQ-InCwCMELQyrhK0bLbEVS2RXK4XFxGlpLZgCDM1uJr-xFghQlVpP6RL6oa_amMPl2kv7zg9UiUSM9Njf2vMRpaKXGUB0NBv3Vgsj4GgCUBS2V_S1R2C0eJ3aPA2iyUg9xA7US-Xlpisx-o3uzxqRIuV2kMhfjUE8mJgzz-OhQRMtQcxgxDVeY8jasADIqDI-dSnzb5foKkO565iADfWhVX0x-WxbH69uATnnh6GF6kK8uPeeUlIV3jZ3uzZNllF7vp8NVi3cxOpY96urZ35K3CVTCzjjos5IMbZ02i20M9XRfqvpGk3DlQE7QQEj20zmYuTd8LQ";
"eyJhbGciOiJSUzI1NiIsImtp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aWNlYWNjb3VudC5jb20iLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiZXhwIjoxNjYwODgwNjczLCJpYXQiOjE2NjA4NzcwNzMsImlzcyI6Imh0dHBzOi8vYWNjb3VudHMuZ29vZ2xlLmNvbSIsInN1YiI6IjExMjgxMDY3Mjk2MzcyODM2NjQwNiJ9.Q2tG-hN6UHecbzaCIlg58K9msp58nLZWs03CBGO_D6F3cI4LKQEUzsbcztZqmNGWd0ld4zkrKzIP9cQosa_xold4hEzSX_ORRHYQLimLYaQmP3rKqWPMsbIupPdpnGqBDzAYjc7Pw9pQBzuZJj8e3FEG6a5tblDfMcgeklXZIkwzN7ypWCbFDoDP2STSYJYZ-LQIB0-Zlex7dm2KhyB8QSkMQK60YvpXz4L1OtwG7spk3yUCWxul6hYF76klST0iS6DH03YdaDpt4gRXkTUKyTRfB10h-WhCAKKRzmT6d_IT9ApIyqPhimkgkBHhLNyjK8lgAJdk9CLriSEOgVpruy";
private static final String SERVICE_ACCOUNT_CERT_URL =
Expand Down Expand Up @@ -331,7 +331,7 @@ private IdTokenVerifier generateTokenVerifier(long mockClockTime) {

public void testVerifyServiceAccountRs256Token() throws IOException {
// use newly used signature
IdTokenVerifier tokenVerifier = generateTokenVerifier(1665085508212L);
IdTokenVerifier tokenVerifier = generateTokenVerifier(1668709195000L);
assertTrue(tokenVerifier.verify(IdToken.parse(JSON_FACTORY, SERVICE_ACCOUNT_RS256_TOKEN)));

// a token with a bad signature that is expected to fail in verify, but work in verifyPayload
Expand Down