osc.c 615 B

12345678910111213141516171819202122232425262728
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. #include <string.h>
  4. #include <curl/curl.h>
  5. #include "cJSON.h"
  6. #include "curl.h"
  7. #include "keystone.h"
  8. int main(int argc, char** argv) {
  9. struct os_credentials creds;
  10. get_credentials(&creds);
  11. char token[256] = { 0 };
  12. get_token(&token, &creds);
  13. printf("%s\n", token);
  14. //s.ptr[s.len] = '\0';
  15. //cJSON *auth_response = cJSON_Parse(s.ptr);
  16. //printf("Response: '%s'\n", cJSON_Print(auth_response));
  17. //cJSON_Delete(auth_response);
  18. //printf("Response: '%s'\n", s.ptr);
  19. //if(s.ptr != NULL) {
  20. //free(s.ptr);
  21. //}
  22. return 0;
  23. }