soar-authentication-identity
Used by authentication service to translate an identity identifier into an UUID
Quickstart
Staff identity provider
Example using the factory.
> identity = Soar::Authentication::Identity::Factory.create({
authenticated_identifier: '[email protected]',
directory_configurations: {
"staff" => {
"provider" => 'Soar::Registry::Directory::Provider::Stub',
"config" => {
"table" => "identity",
"primary_key" =>"uuid",
"index" => ["uuid", "email"]
}
},
"customer" => {},
"domain" => {}
}
})
> puts identity.uuid
"85777bfa-b743-4ba9-8308-e8a1e4d44fbe"
> puts identity.role
'staff'
Tests
Local
Identity factory
$ bundle exec rspec
Stub identity provider
$ TEST_ORCHESTRATION_PROVIDER=Stub cucumber
Staff identity provider
$ TEST_ORCHESTRATION_PROVIDER=Staff cucumber
Customer identity provider
Not implemented
Domain identity provider
Not implemented
CI
Stub identity provider
docker-compose --file docker-compose.stub.yml up --abort-on-container-exit --remove-orphans
EXIT_CODE=$(docker ps -a -f "name=soar-authentication-identity-provider-stub" -q | xargs docker inspect -f "{{ .State.ExitCode }}");
exit $EXIT_CODE;
Staff identity provider
docker-compose --file docker-compose.staff.yml up --abort-on-container-exit --remove-orphans
EXIT_CODE=$(docker ps -a -f "name=soar-authentication-identity-provider-staff" -q | xargs docker inspect -f "{{ .State.ExitCode }}");
exit $EXIT_CODE;