2.3 Authorization Server Storage Database Schema

When the Authorization Server storage is set to Database, two new tables will have to be manually created in the Database where the Authorization Server will be storing the scope and the details of the client registration.

The following table schema example can be used to generate the tables for the Authorization Server.


Example - Table Schema

CREATE TABLE oauth_scope (
scope       VARCHAR(64) NOT NULL PRIMARY KEY, 
description VARCHAR(128)
);

CREATE TABLE oauth_client ( 
client_name   VARCHAR(128)    NOT NULL PRIMARY KEY, 
client_id     VARCHAR(64)     NOT NULL, 
client_secret VARCHAR(64)     NOT NULL, 
client_scope  VARCHAR(2048)   NOT NULL 
);