Library overhaul - #25
Merged
Merged
Conversation
…torage The Backend class and the scim2_server.backend module are removed. A storage implements ScimStorage. InMemoryStorage keeps the resources in memory. The ScimStorageContract tests of scim2_server.testing check a storage.
ScimService holds the SCIM logic and does no I/O. ScimHandler serves the requests with a service and a storage. SCIMApplication becomes a werkzeug adapter over a handler. It takes an optional ScimService, so a subclass can change the service. The methods of SCIMApplication that held the SCIM logic are removed.
… and the handler AsyncScimStorage, AsyncInMemoryStorage and AsyncScimHandler serve the same requests with coroutines.
SCIMApplication.register_bearer_token is removed. The scim2_server.testserver package holds the scim2-server command and BearerTokenApplication, which checks static bearer tokens.
The handler methods take a ScimRequest. The service matches the requests against the routes of RFC 7644 §3.2. An adapter passes every request to ScimHandler.handle.
SCIMApplication and the werkzeug dependency are removed. WSGIApplication and ASGIApplication, in scim2_server.applications, serve the SCIM protocol with no web framework. TenantDispatcher and ForwardedHeaders are WSGI middlewares. The scim2-server command serves the application with wsgiref.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rework the whole library to make it reusable in different contexts: