12345678910111213141516171819202122232425262728 |
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #include <curl/curl.h>
- #include "cJSON.h"
- #include "curl.h"
- #include "keystone.h"
- int main(int argc, char** argv) {
- struct os_credentials creds;
- get_credentials(&creds);
- char token[256] = { 0 };
- get_token(&token, &creds);
- printf("%s\n", token);
- //s.ptr[s.len] = '\0';
- //cJSON *auth_response = cJSON_Parse(s.ptr);
- //printf("Response: '%s'\n", cJSON_Print(auth_response));
- //cJSON_Delete(auth_response);
- //printf("Response: '%s'\n", s.ptr);
- //if(s.ptr != NULL) {
- //free(s.ptr);
- //}
- return 0;
- }
|