Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Test custom authorization.
Synopsis
- testAuthorization :: NonEmpty AuthInfo -> TestAuthorization
- data TestAuthorization
- taClientId :: Lens' TestAuthorization (Maybe Text)
- taPolicyNamesToAdd :: Lens' TestAuthorization [Text]
- taPrincipal :: Lens' TestAuthorization (Maybe Text)
- taCognitoIdentityPoolId :: Lens' TestAuthorization (Maybe Text)
- taPolicyNamesToSkip :: Lens' TestAuthorization [Text]
- taAuthInfos :: Lens' TestAuthorization (NonEmpty AuthInfo)
- testAuthorizationResponse :: Int -> TestAuthorizationResponse
- data TestAuthorizationResponse
- tarsAuthResults :: Lens' TestAuthorizationResponse [AuthResult]
- tarsResponseStatus :: Lens' TestAuthorizationResponse Int
Creating a Request
Creates a value of TestAuthorization
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
taClientId
- The MQTT client ID.taPolicyNamesToAdd
- When testing custom authorization, the policies specified here are treated as if they are attached to the principal being authorized.taPrincipal
- The principal.taCognitoIdentityPoolId
- The Cognito identity pool ID.taPolicyNamesToSkip
- When testing custom authorization, the policies specified here are treated as if they are not attached to the principal being authorized.taAuthInfos
- A list of authorization info objects. Simulating authorization will create a response for eachauthInfo
object in the list.
data TestAuthorization Source #
See: testAuthorization
smart constructor.
Instances
Request Lenses
taClientId :: Lens' TestAuthorization (Maybe Text) Source #
The MQTT client ID.
taPolicyNamesToAdd :: Lens' TestAuthorization [Text] Source #
When testing custom authorization, the policies specified here are treated as if they are attached to the principal being authorized.
taPrincipal :: Lens' TestAuthorization (Maybe Text) Source #
The principal.
taCognitoIdentityPoolId :: Lens' TestAuthorization (Maybe Text) Source #
The Cognito identity pool ID.
taPolicyNamesToSkip :: Lens' TestAuthorization [Text] Source #
When testing custom authorization, the policies specified here are treated as if they are not attached to the principal being authorized.
taAuthInfos :: Lens' TestAuthorization (NonEmpty AuthInfo) Source #
A list of authorization info objects. Simulating authorization will create a response for each authInfo
object in the list.
Destructuring the Response
testAuthorizationResponse Source #
Creates a value of TestAuthorizationResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
tarsAuthResults
- The authentication results.tarsResponseStatus
- -- | The response status code.
data TestAuthorizationResponse Source #
See: testAuthorizationResponse
smart constructor.
Instances
Response Lenses
tarsAuthResults :: Lens' TestAuthorizationResponse [AuthResult] Source #
The authentication results.
tarsResponseStatus :: Lens' TestAuthorizationResponse Int Source #
- - | The response status code.