AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Classes | |
class | AuthorizationManagerTest |
class | MockAuthorizationAdapter |
Mock class implementing the adapter. More... | |
class | MockRegistrationManager |
Mock class implementing RegistrationManagerInterface . More... | |
class | StubAuthorization |
Class to implement AuthorizationInterface, which is used to retrieve the id. More... | |
Functions | |
TEST_F (AuthorizationManagerTest, test_create_Succeeds) | |
Test that create succeeds. More... | |
TEST_F (AuthorizationManagerTest, test_createNullParam_Fails) | |
Test that create with null param results in nullptr. More... | |
TEST_F (AuthorizationManagerTest, test_authorizingState_DoesNotPersist) | |
Test that in the AUTHORIZING state, auth and user id are not persisted. More... | |
TEST_F (AuthorizationManagerTest, test_authorizingState_NoToken) | |
Test that in the AUTHORIZING state, the getToken calls no-op. More... | |
TEST_F (AuthorizationManagerTest, test_refreshedState_Persisted) | |
Check that in the REFRESHED state, the token is now valid as well as adapter id and user id are persisted. More... | |
TEST_F (AuthorizationManagerTest, test_unrecoverableError_Success) | |
Check the behavior if AuthorizationManager is in the UNRECOVERABLE_ERROR state. More... | |
TEST_F (AuthorizationManagerTest, test_invalidStateTransition_NoNotification) | |
Check invalid transitions. More... | |
TEST_F (AuthorizationManagerTest, test_getState) | |
Check that getState returns the correct thing. More... | |
TEST_F (AuthorizationManagerTest, test_activeAuthorization_Success) | |
Check that the active authorization returns the correct id. More... | |
TEST_F (AuthorizationManagerTest, test_logout) | |
Check that logout succeeds. More... | |
INSTANTIATE_TEST_CASE_P (Parameterized, AuthorizationManagerTest, ::testing::Values(std::pair< std::string, std::string >(ADAPTER_ID, USER_ID_2), std::pair< std::string, std::string >(ADAPTER_ID_2, USER_ID), std::pair< std::string, std::string >(ADAPTER_ID_2, USER_ID_2))) | |
Parameterized Tests to test combinations of mismatched adapter and user ids. More... | |
TEST_P (AuthorizationManagerTest, test_mismatchingIdRefreshed_AuthorizingRequest_ImplictLogout) | |
Check the implict logout behavior if AuthorizationManager is in the REFRESHED state. More... | |
TEST_P (AuthorizationManagerTest, test_mismatchingIdAuthorizing_AuthorizingRequest_ImplictLogout) | |
TEST_P (AuthorizationManagerTest, test_mismatchingId_RefreshingRequest_Logout) | |
Variables | |
std::chrono::milliseconds | TIMEOUT {2000} |
Timeout for test cases that require synchronization. More... | |
static const std::string | ADAPTER_ID = "test-adapter" |
static const std::string | USER_ID = "test-user-id" |
static const std::string | AUTH_TOKEN = "supersecureauthotoken" |
static const std::string | ADAPTER_ID_2 = ADAPTER_ID + "2" |
static const std::string | USER_ID_2 = USER_ID + "2" |
static const std::string | AUTH_TOKEN_2 = AUTH_TOKEN + "2" |
static const std::string | MISC_TABLE_COMPONENT_NAME = "AuthorizationManager" |
static const std::string | MISC_TABLE_TABLE_NAME = "authorizationState" |
static const std::string | MISC_TABLE_ADAPTER_ID_KEY = "authAdapterId" |
static const std::string | MISC_TABLE_USER_ID_KEY = "userId" |
alexaClientSDK::acsdkAuthorization::test::INSTANTIATE_TEST_CASE_P | ( | Parameterized | , |
AuthorizationManagerTest | , | ||
::testing::Values(std::pair< std::string, std::string >(ADAPTER_ID, USER_ID_2), std::pair< std::string, std::string >(ADAPTER_ID_2, USER_ID), std::pair< std::string, std::string >(ADAPTER_ID_2, USER_ID_2)) | |||
) |
Parameterized Tests to test combinations of mismatched adapter and user ids.
alexaClientSDK::acsdkAuthorization::test::TEST_F | ( | AuthorizationManagerTest | , |
test_create_Succeeds | |||
) |
Test that create succeeds.
alexaClientSDK::acsdkAuthorization::test::TEST_F | ( | AuthorizationManagerTest | , |
test_createNullParam_Fails | |||
) |
Test that create with null param results in nullptr.
alexaClientSDK::acsdkAuthorization::test::TEST_F | ( | AuthorizationManagerTest | , |
test_authorizingState_DoesNotPersist | |||
) |
Test that in the AUTHORIZING state, auth and user id are not persisted.
alexaClientSDK::acsdkAuthorization::test::TEST_F | ( | AuthorizationManagerTest | , |
test_authorizingState_NoToken | |||
) |
Test that in the AUTHORIZING state, the getToken calls no-op.
alexaClientSDK::acsdkAuthorization::test::TEST_F | ( | AuthorizationManagerTest | , |
test_refreshedState_Persisted | |||
) |
Check that in the REFRESHED state, the token is now valid as well as adapter id and user id are persisted.
alexaClientSDK::acsdkAuthorization::test::TEST_F | ( | AuthorizationManagerTest | , |
test_unrecoverableError_Success | |||
) |
Check the behavior if AuthorizationManager is in the UNRECOVERABLE_ERROR state.
alexaClientSDK::acsdkAuthorization::test::TEST_F | ( | AuthorizationManagerTest | , |
test_invalidStateTransition_NoNotification | |||
) |
Check invalid transitions.
alexaClientSDK::acsdkAuthorization::test::TEST_F | ( | AuthorizationManagerTest | , |
test_getState | |||
) |
Check that getState returns the correct thing.
alexaClientSDK::acsdkAuthorization::test::TEST_F | ( | AuthorizationManagerTest | , |
test_activeAuthorization_Success | |||
) |
Check that the active authorization returns the correct id.
alexaClientSDK::acsdkAuthorization::test::TEST_F | ( | AuthorizationManagerTest | , |
test_logout | |||
) |
Check that logout succeeds.
alexaClientSDK::acsdkAuthorization::test::TEST_P | ( | AuthorizationManagerTest | , |
test_mismatchingIdRefreshed_AuthorizingRequest_ImplictLogout | |||
) |
Check the implict logout behavior if AuthorizationManager is in the REFRESHED state.
alexaClientSDK::acsdkAuthorization::test::TEST_P | ( | AuthorizationManagerTest | , |
test_mismatchingIdAuthorizing_AuthorizingRequest_ImplictLogout | |||
) |
The new adapter will be allow to continue authorizing while we reset the current adapter and logout the rest of the device.
alexaClientSDK::acsdkAuthorization::test::TEST_P | ( | AuthorizationManagerTest | , |
test_mismatchingId_RefreshingRequest_Logout | |||
) |
Another adapter has reported it is in REFRESHED state, meaning we have multiple authorizations. To protect customer data, force a logout, and reset all authorizations.
|
static |
Adapter Related Constants
|
static |
Adapter Related Constants
|
static |
Adapter Related Constants
|
static |
Adapter Related Constants
|
static |
Storage Constants
|
static |
Storage Constants
|
static |
Storage Constants
|
static |
Storage Constants
std::chrono::milliseconds alexaClientSDK::acsdkAuthorization::test::TIMEOUT {2000} |
Timeout for test cases that require synchronization.
|
static |
Adapter Related Constants
|
static |
Adapter Related Constants
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0