/AWS1/IF_LIC=>GETACCESSTOKEN()¶
About GetAccessToken¶
Gets a temporary access token to use with AssumeRoleWithWebIdentity. Access tokens are valid for one hour.
Method Signature¶
METHODS /AWS1/IF_LIC~GETACCESSTOKEN
IMPORTING
!IV_TOKEN TYPE /AWS1/LICTOKENSTRING OPTIONAL
!IT_TOKENPROPERTIES TYPE /AWS1/CL_LICMAXSIZE3STRLIST_W=>TT_MAXSIZE3STRINGLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_licgetaccesstokenrsp
RAISING
/AWS1/CX_LICACCESSDENIEDEX
/AWS1/CX_LICAUTHEXCEPTION
/AWS1/CX_LICRLIMEXCEEDEDEX
/AWS1/CX_LICSERVERINTERNALEX
/AWS1/CX_LICVALIDATIONEX
/AWS1/CX_LICCLIENTEXC
/AWS1/CX_LICSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_token TYPE /AWS1/LICTOKENSTRING /AWS1/LICTOKENSTRING¶
Refresh token, encoded as a JWT token.
Optional arguments:¶
it_tokenproperties TYPE /AWS1/CL_LICMAXSIZE3STRLIST_W=>TT_MAXSIZE3STRINGLIST TT_MAXSIZE3STRINGLIST¶
Token properties to validate against those present in the JWT token.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_licgetaccesstokenrsp /AWS1/CL_LICGETACCESSTOKENRSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->getaccesstoken(
it_tokenproperties = VALUE /aws1/cl_licmaxsize3strlist_w=>tt_maxsize3stringlist(
( new /aws1/cl_licmaxsize3strlist_w( |string| ) )
)
iv_token = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_tokenstring = lo_result->get_accesstoken( ).
ENDIF.