Save the token value and set its expiration. Tokens values are stored in Isolated Storage
.
Enum "Provider ID RWU"
- Specifies the enum ID of RESTwithUS provider.Enum "Entity ID RWU"
- Specifies the enum ID of RESTwithUS entity.Text
- Specifies the token unique identifier (e.g. user name or token type).Text
- Specifies the token value.Date
- Specifies the token expiration date. Use 0D
for no expiration.Time
- Specifies the token expiration time. Use 0T
for no expiration.Text
Token Isolated Storage
key, that can be used for retrieveing token value.
//Get the token from response data and manually set the expiration date and time after 10 minutes
Token := APIScriptRWU.GET_RESPONSE_VALUE_BY_JPATH('$.token');
ExpirationDateTime := CreateDateTime(Today, Time) + (10 * 60000);
APIScriptRWU.CREATE_TOKEN(ProviderID::TestProvider, EntityID::TestProvider_Session, 'test@user.com',_Token, DT2Date(ExpirationDateTime), DT2Time(ExpirationDateTime));
//Save the token that will not expire
APIScriptRWU.CREATE_TOKEN(ProviderID::TestProvider, EntityID::TestProvider_Session, 'test2@user.com',_Token, 0D, 0T);