| 1 |
#ifndef AWS_AUTH_TOKEN_PRIVATE_H |
| 2 |
#define AWS_AUTH_TOKEN_PRIVATE_H |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
#include <aws/auth/auth.h> |
| 10 |
#include <aws/common/date_time.h> |
| 11 |
|
| 12 |
|
| 13 |
struct aws_sso_token { |
| 14 |
struct aws_allocator *allocator; |
| 15 |
|
| 16 |
struct aws_string *access_token; |
| 17 |
struct aws_date_time expiration; |
| 18 |
}; |
| 19 |
|
| 20 |
AWS_EXTERN_C_BEGIN |
| 21 |
|
| 22 |
|
| 23 |
AWS_AUTH_API |
| 24 |
struct aws_string *aws_construct_sso_token_path(struct aws_allocator *allocator, const struct aws_string *input); |
| 25 |
|
| 26 |
AWS_AUTH_API |
| 27 |
void aws_sso_token_destroy(struct aws_sso_token *token); |
| 28 |
|
| 29 |
|
| 30 |
AWS_AUTH_API |
| 31 |
struct aws_sso_token *aws_sso_token_new_from_file(struct aws_allocator *allocator, const struct aws_string *file_path); |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
AWS_AUTH_API |
| 42 |
struct aws_credentials *aws_credentials_new_token( |
| 43 |
struct aws_allocator *allocator, |
| 44 |
struct aws_byte_cursor token, |
| 45 |
uint64_t expiration_timepoint_in_seconds); |
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
AWS_AUTH_API |
| 54 |
struct aws_byte_cursor aws_credentials_get_token(const struct aws_credentials *credentials); |
| 55 |
|
| 56 |
AWS_EXTERN_C_END |
| 57 |
|
| 58 |
#endif |