// Path: src/main/java/com/google/fleetengine/auth/token/factory/signer/util/CommonConstants.java
// public final class CommonConstants {
//   /* JWT name of the authorization claim.  */
//   public static final String JWT_CLAIM_AUTHORIZATION_PROPERTY = "authorization";
// 
//   /* Default value of the JWT audience (aud claim). */
//   public static final String DEFAULT_JWT_AUDIENCE = "https://fleetengine.googleapis.com/";
// 
//   private CommonConstants() {}
// }


import com.google.auto.value.AutoValue;
import com.google.fleetengine.auth.token.factory.signer.util.CommonConstants;
import java.util.Date;
import javax.annotation.Nullable;
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.fleetengine.auth.token;


/**
 * Provides the authorization information needed to establish communication with Fleet Engine
 * servers.
 */
@AutoValue
public abstract class FleetEngineToken {
  /** Token creation timestamp. */
  public abstract Date creationTimestamp();

  /** Token expiration timestamp. */
  public abstract Date expirationTimestamp();

  /** Audience (aud claim) of the JWT. */
  public abstract String audience();

  /** Signed and base64 encoded JWT. */
  @Nullable
  public abstract String jwt();

  /** Scope of the authorization token. */
  public abstract FleetEngineTokenType tokenType();

  /** Custom authorization claims written to JWT. */
  public abstract FleetEngineTokenClaims authorizationClaims();

  /** Provides a builder for {@link FleetEngineToken}. */
  public static Builder builder() {
    return new AutoValue_FleetEngineToken.Builder()
// Path: src/main/java/com/google/fleetengine/auth/token/factory/signer/util/CommonConstants.java
// public final class CommonConstants {
//   /* JWT name of the authorization claim.  */
//   public static final String JWT_CLAIM_AUTHORIZATION_PROPERTY = "authorization";
// 
//   /* Default value of the JWT audience (aud claim). */
//   public static final String DEFAULT_JWT_AUDIENCE = "https://fleetengine.googleapis.com/";
// 
//   private CommonConstants() {}
// }


// Path: src/main/java/com/google/fleetengine/auth/token/FleetEngineToken.java
import com.google.auto.value.AutoValue;
import com.google.fleetengine.auth.token.factory.signer.util.CommonConstants;
import java.util.Date;
import javax.annotation.Nullable;

// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.fleetengine.auth.token;


/**
 * Provides the authorization information needed to establish communication with Fleet Engine
 * servers.
 */
@AutoValue
public abstract class FleetEngineToken {
  /** Token creation timestamp. */
  public abstract Date creationTimestamp();

  /** Token expiration timestamp. */
  public abstract Date expirationTimestamp();

  /** Audience (aud claim) of the JWT. */
  public abstract String audience();

  /** Signed and base64 encoded JWT. */
  @Nullable
  public abstract String jwt();

  /** Scope of the authorization token. */
  public abstract FleetEngineTokenType tokenType();

  /** Custom authorization claims written to JWT. */
  public abstract FleetEngineTokenClaims authorizationClaims();

  /** Provides a builder for {@link FleetEngineToken}. */
  public static Builder builder() {
    return new AutoValue_FleetEngineToken.Builder()
        .setAudience(CommonConstants.DEFAULT_JWT_AUDIENCE);