ark::aws::CognitoUserPoolServer

Defined in header “ark/aws/testing/cognito_up_server.hh”.


This is a Cognito “user pool” emulator something that allows us to register groups/users/etc against a user pool, useful for integration tests.

Methods

  • CognitoUserPoolServer()
    Constructor. Initializes a new, blank user pool.

  • ~CognitoUserPoolServer()
    Destructor. Shuts down the system.

  • core::Url endpoint()
    Returns the endpoint that you should connect to in order to work with this user pool.

  • const std::string & id()
    Returns the user pool identifier that you should use for working with this pool.

  • const std::string & client_id()
    Returns the client identifier for working with this pool.

  • const std::string & client_secret()
    Returns the client secret for working with this pool.

  • core::Guid add_user(const std::string & username, const std::string & email)
    Support for manually adding a user to the database. We don’t support adding users through the standard APIs, our mock server bypasses that part of the workflow.

    The generated UUID representing the user’s sub is returned.

  • void add_client_id(const std::string & client_id)
    Adds a new client ID (useful when generating S2S tokens manually).

  • void set_s2s_keypair(const crypt::GeneratedKeyPair & key_pair)
    Sets the key pair used for signing server-to-server tokens.

  • void set_username_authentication_keypair(const crypt::GeneratedKeyPair & key_pair)
    Sets the key pair used for signing username based authentication.