func (s *ProvisioningService) GetToken(token string) (*services.ProvisionToken, error) {
	out, _, err := s.backend.GetValAndTTL([]string{"tokens"}, token)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	var t *services.ProvisionToken
	err = json.Unmarshal(out, &t)
	if err != nil {
		t.Token = token // for backwards compatibility with older tokens
		return nil, trace.Wrap(err)
	}
	return t, nil
}
// GetToken finds and returns token by id
GetToken finds and returns token by id
// GetToken finds and returns token by id
func (s *ProvisioningService) GetToken(token string) (*services.ProvisionToken, error) {
	out, _, err := s.backend.GetValAndTTL([]string{"tokens"}, token)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	var t *services.ProvisionToken
	err = json.Unmarshal(out, &t)
	if err != nil {
		t.Token = token 
		return nil, trace.Wrap(err)
	}
	return t, nil
}
func ( s * ProvisioningService ) GetToken ( token string ) ( * services . ProvisionToken , error ) { out , _ , err := s . backend . GetValAndTTL ( [ ] string { " " } , token ) if err != nil { return nil , trace . Wrap ( err ) } var t * services . ProvisionToken err = json . Unmarshal ( out , & t ) if err != nil { t . Token = token return nil , trace . Wrap ( err ) } return t , nil }
GetToken finds and returns token by id
GetToken finds and returns token by id
// for backwards compatibility with older tokens