def token(new_token)
      old_token    = client.token
      client.token = new_token
      json = client.get("/v1/auth/token/lookup-self")
      secret = Secret.decode(json)
      return secret
    rescue
      client.token = old_token
      raise
    end
def token(new_token)
      old_token    = client.token
      client.token = new_token
      json = client.get("/v1/auth/token/lookup-self")
      secret = Secret.decode(json)
      return secret
    rescue
      client.token = old_token
      raise
    end
Authenticate via the "token" authentication method. This authentication
 method is a bit bizarre because you already have a token, but hey,
 whatever floats your boat.

 This method hits the `/v1/auth/token/lookup-self` endpoint after setting
 the Vault client's token to the given token parameter. If the self lookup
 succeeds, the token is persisted onto the client for future requests. If
 the lookup fails, the old token (which could be unset) is restored on the
 client.

 @example
   Vault.auth.token("6440e1bd-ba22-716a-887d-e133944d22bd") #=> #<Vault::Secret lease_id="">
   Vault.token #=> "6440e1bd-ba22-716a-887d-e133944d22bd"

 @param [String] new_token
   the new token to try to authenticate and store on the client

 @return [Secret]