| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#ifndef AWS_AUTH_TOKEN_PRIVATE_H |
| 6 |
#define AWS_AUTH_TOKEN_PRIVATE_H |
| 7 |
|
| 8 |
#include <aws/auth/auth.h> |
| 9 |
#include <aws/common/date_time.h> |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
struct aws_login_token; |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
struct aws_login_refresh_response; |
| 26 |
|
| 27 |
AWS_EXTERN_C_BEGIN |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
AWS_AUTH_API |
| 33 |
struct aws_login_token *aws_login_token_new_from_file(struct aws_allocator *allocator, struct aws_byte_buf *file_path); |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
AWS_AUTH_API |
| 39 |
struct aws_byte_cursor aws_login_token_get_account_id(struct aws_login_token *token); |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
AWS_AUTH_API |
| 45 |
void aws_login_token_set_access_key_id(struct aws_login_token *token, struct aws_byte_cursor value); |
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
AWS_AUTH_API |
| 51 |
void aws_login_token_set_secret_access_key(struct aws_login_token *token, struct aws_byte_cursor value); |
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
AWS_AUTH_API |
| 57 |
void aws_login_token_set_session_token(struct aws_login_token *token, struct aws_byte_cursor value); |
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
AWS_AUTH_API |
| 63 |
void aws_login_token_set_expires_at(struct aws_login_token *token, struct aws_date_time value); |
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
AWS_AUTH_API |
| 69 |
void aws_login_token_set_refresh_token(struct aws_login_token *token, struct aws_byte_cursor value); |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
AWS_AUTH_API |
| 75 |
struct aws_login_token *aws_login_token_new_from_json_document( |
| 76 |
struct aws_allocator *allocator, |
| 77 |
struct aws_byte_cursor payload_cursor); |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
AWS_AUTH_API |
| 83 |
int aws_login_token_write_token_file( |
| 84 |
const struct aws_login_token *token, |
| 85 |
struct aws_allocator *allocator, |
| 86 |
const struct aws_byte_buf *file_path); |
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
AWS_AUTH_API |
| 93 |
int aws_login_token_get_dpop_header( |
| 94 |
struct aws_allocator *allocator, |
| 95 |
const struct aws_login_token *token, |
| 96 |
struct aws_byte_cursor host, |
| 97 |
struct aws_byte_buf *header_value); |
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
AWS_AUTH_API |
| 105 |
int aws_login_token_construct_token_path( |
| 106 |
struct aws_allocator *allocator, |
| 107 |
const struct aws_string *input, |
| 108 |
const struct aws_string *directory_override, |
| 109 |
struct aws_byte_buf *login_token_path_buf); |
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
AWS_AUTH_API |
| 115 |
int aws_login_token_get_body( |
| 116 |
struct aws_allocator *allocator, |
| 117 |
const struct aws_login_token *token, |
| 118 |
struct aws_byte_buf *body_buf); |
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
AWS_AUTH_API |
| 124 |
struct aws_login_token *aws_login_token_destroy(struct aws_login_token *token); |
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
AWS_AUTH_API |
| 130 |
struct aws_login_refresh_response *aws_login_refresh_new_from_json_document( |
| 131 |
struct aws_allocator *allocator, |
| 132 |
struct aws_byte_cursor payload_cursor); |
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
AWS_AUTH_API |
| 138 |
struct aws_byte_cursor aws_login_refresh_get_access_key_id(struct aws_login_refresh_response *token); |
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
AWS_AUTH_API |
| 144 |
struct aws_byte_cursor aws_login_refresh_get_secret_access_key(struct aws_login_refresh_response *token); |
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
AWS_AUTH_API |
| 150 |
struct aws_byte_cursor aws_login_refresh_get_session_token(struct aws_login_refresh_response *token); |
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
AWS_AUTH_API |
| 156 |
struct aws_date_time aws_login_refresh_get_expires_at(struct aws_login_refresh_response *token); |
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
AWS_AUTH_API |
| 162 |
struct aws_byte_cursor aws_login_refresh_get_refresh_token(struct aws_login_refresh_response *token); |
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
AWS_AUTH_API |
| 168 |
struct aws_login_refresh_response *aws_login_refresh_destroy(struct aws_login_refresh_response *token); |
| 169 |
|
| 170 |
AWS_EXTERN_C_END |
| 171 |
|
| 172 |
#endif |