code: func (t *TokensClient) PostLogin(ctx context.Context, creds apitypes.LoginCredential) (
  	*base64.Value, *envelope.Token, error) {
  	respBody := loginTokenResponse{}
  
  	var body interface{}
  	switch creds.Type() {
  	case apitypes.UserSession:
  		body = &loginTokenUserRequest{
  			Type:  primitive.LoginToken,
  			Email: creds.Identifier(),
  		}
  	case apitypes.MachineSession:
  		body = &loginTokenMachineRequest{
  			Type:    primitive.LoginToken,
  			TokenID: creds.Identifier(),
  		}
  	}
  
  	err := tokenRoundTrip(ctx, t.client, "", "POST", "/tokens", nil, body, &respBody)
  	if err != nil {
  		return nil, nil, err
  	}
  
  	return respBody.Salt, respBody.Token, nil
  }
docs: // PostLogin requests a login token from the registry for the provided email
  // address.