code: public static DelegationTokenIdentifier extractIdentifier(
        final Token<? extends DelegationTokenIdentifier> token) throws IOException {
      checkArgument(token != null, "null token");
      DelegationTokenIdentifier identifier;
      // harden up decode beyond what Token does itself
      try {
        identifier = token.decodeIdentifier();
      } catch (RuntimeException e) {
        Throwable cause = e.getCause();
        if (cause != null) {
          // its a wrapping around class instantiation.
          throw new DelegationTokenIOException("Decoding GCS token " + cause, cause);
        }
        throw e;
      }
      if (identifier == null) {
        throw new DelegationTokenIOException("Failed to unmarshall token " + token);
      }
      return identifier;
    }
docs: From a token, get the session token identifier.
  
  @param token token to process
  @return the session token identifier
  @throws IOException failure to validate/read data encoded in identifier.
  @throws IllegalArgumentException if the token isn't an GCP session token