Skip to content
Permalink
Browse files
feat: promote IdToken and JWT features (#538)
These features have been available for months and have not received bug reports.
  • Loading branch information
chingor13 committed Jan 26, 2021
1 parent 9a11c50 commit b514fe0cebe5a294e0cf97b7b5349e6a523dc7b2
@@ -42,7 +42,6 @@
import com.google.api.client.util.GenericData;
import com.google.auth.ServiceAccountSigner;
import com.google.auth.http.HttpTransportFactory;
import com.google.common.annotations.Beta;
import com.google.common.base.Joiner;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableSet;
@@ -212,7 +211,6 @@ public AccessToken refreshAccessToken() throws IOException {
* @throws IOException if the attempt to get an IdToken failed
* @return IdToken object which includes the raw id_token, JsonWebSignature
*/
@Beta
@Override
public IdToken idTokenWithAudience(String targetAudience, List<IdTokenProvider.Option> options)
throws IOException {
@@ -33,7 +33,6 @@

import com.google.api.client.json.JsonFactory;
import com.google.api.client.json.webtoken.JsonWebSignature;
import com.google.common.annotations.Beta;
import com.google.common.base.MoreObjects;
import java.io.IOException;
import java.io.ObjectInputStream;
@@ -43,7 +42,6 @@
import java.util.Objects;

/** Represents a temporary IdToken and its JsonWebSignature object */
@Beta
public class IdToken extends AccessToken implements Serializable {

private static final long serialVersionUID = -8514239465808977353L;
@@ -32,7 +32,6 @@
package com.google.auth.oauth2;

import com.google.api.client.util.Preconditions;
import com.google.common.annotations.Beta;
import com.google.common.base.MoreObjects;
import java.io.IOException;
import java.util.List;
@@ -101,7 +100,6 @@
* System.out.println(tokenCredential.getIdToken().getJsonWebSignature().getPayload().getExpirationTimeSeconds());
* </pre>
*/
@Beta
public class IdTokenCredentials extends OAuth2Credentials {

private static final long serialVersionUID = -2133257318957588431L;
@@ -31,12 +31,10 @@

package com.google.auth.oauth2;

import com.google.common.annotations.Beta;
import java.io.IOException;
import java.util.List;

/** Interface for an Google OIDC token provider. This type represents a google issued OIDC token. */
@Beta
public interface IdTokenProvider {

/**
@@ -45,7 +45,6 @@
import com.google.auth.ServiceAccountSigner;
import com.google.auth.http.HttpCredentialsAdapter;
import com.google.auth.http.HttpTransportFactory;
import com.google.common.annotations.Beta;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableMap;
import java.io.IOException;
@@ -303,7 +302,6 @@ public AccessToken refreshAccessToken() throws IOException {
* @return IdToken object which includes the raw id_token, expiration, and audience
* @throws IOException if the attempt to get an ID token failed
*/
@Beta
@Override
public IdToken idTokenWithAudience(String targetAudience, List<IdTokenProvider.Option> options)
throws IOException {
@@ -31,10 +31,7 @@

package com.google.auth.oauth2;

import com.google.common.annotations.Beta;

/** Interface for creating custom JWT tokens */
@Beta
public interface JwtProvider {

/**
@@ -55,7 +55,6 @@
import com.google.api.client.util.SecurityUtils;
import com.google.auth.ServiceAccountSigner;
import com.google.auth.http.HttpTransportFactory;
import com.google.common.annotations.Beta;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableSet;
@@ -476,7 +475,6 @@ public boolean isRequired(HttpResponse response) {
* @throws IOException if the attempt to get an IdToken failed
* @return IdToken object which includes the raw id_token, expiration and audience
*/
@Beta
@Override
public IdToken idTokenWithAudience(String targetAudience, List<Option> options)
throws IOException {
@@ -41,7 +41,6 @@
import com.google.api.client.util.Clock;
import com.google.api.client.util.Key;
import com.google.auth.http.HttpTransportFactory;
import com.google.common.annotations.Beta;
import com.google.common.base.Preconditions;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
@@ -79,7 +78,6 @@
* @author Jeff Ching
* @since 0.21.0
*/
@Beta
public class TokenVerifier {
private static final String IAP_CERT_URL = "https://www.gstatic.com/iap/verify/public_key-jwk";
private static final String FEDERATED_SIGNON_CERT_URL =

0 comments on commit b514fe0

Please sign in to comment.