1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| # 客户端认证信息表,只需建表,数据会自动创建 CREATE TABLE `oauth2_authorized_client` ( `client_registration_id` varchar(100) COLLATE utf8mb4_bin NOT NULL COMMENT '客户端注册Id', `principal_name` varchar(200) COLLATE utf8mb4_bin NOT NULL COMMENT '登录用户名称', `access_token_type` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '验证类型,这里是bear', `access_token_value` blob DEFAULT NULL COMMENT 'access_token的值', `access_token_issued_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'access_token的创建时间', `access_token_expires_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'access_token的过期时间', `access_token_scopes` varchar(1000) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '授权范围', `refresh_token_value` blob DEFAULT NULL COMMENT 'refresh_token的值', `refresh_token_issued_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'refresh_token创建时间', `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '数据创建时间', `update_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '数据最后更新时间', PRIMARY KEY (`client_registration_id`,`principal_name`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|