- ${auth_data}= Create Auth Data ${USER} ${PWD}
- ${resp}= AAA Login ${CONTROLLER} ${auth_data}
- ${auth_token}= Extract Value From Content ${resp.content} /access_token strip
+ ${auth_token}= Get Auth Token
+ Make REST Transaction 200 ${auth_token}
+ Revoke Auth Token ${auth_token}
+ Make REST Transaction 401 ${auth_token}
+
+Disable Authentication And Re-Enable Authentication
+ [Documentation] Toggles authentication off and verifies that no login credentials are needed for REST transactions
+ Disable Authentication On Controller ${CONTROLLER}
+ Wait Until Keyword Succeeds 10s 1s Make REST Transaction 200
+ Enable Authentication On Controller ${CONTROLLER}
+ Wait Until Keyword Succeeds 10s 1s Validate That Authentication Fails With Wrong Token
+ ${auth_token}= Get Auth Token
+ Make REST Transaction 200 ${auth_token}
+
+*** Keywords ***
+Validate That Authentication Fails With Wrong Token
+ ${bad_token}= Set Variable notARealToken
+ Make REST Transaction 401 ${bad_token}
+
+Make REST Transaction
+ [Arguments] ${expected_status_code} ${auth_data}=${EMPTY}