OAuth API | DDD Approach | Apache Cassandra As Backend Database
Aditya Hajare (Linkedin).
WIP (Work In Progress)!
Open-sourced software licensed under the MIT license.
- How to setup Cassandra on MacOS
- Steps:
# Install Python brew install python # Install Cassandra brew install cassandra # Install cqlsh pip install cql # Start Cassandra cassandra -f # Start cqlsh cqlsh
- In
cqlshshell, type following to createkeyspaceandoauthtable:# List all keyspaces describe keyspaces; # Create new keyspace called "oauth" with single replica CREATE KEYSPACE oauth WITH REPLICATION = {'class': 'SimpleStrategy', 'replication_factor': 1}; # Use "oauth" keyspace USE oauth; # Create "access_tokens" table CREATE TABLE access_tokens( access_token VARCHAR PRIMARY KEY, user_id BIGINT, client_id BIGINT, expires BIGINT); # Describe "access_tokens" table describe access_tokens; # Select operation on "access_tokens" table SELECT * FROM access_tokens WHERE access_token='adi';