• oauth2的数据库设计


    CREATE TABLE `oauth_client_details` (
    `client_id` varchar(255) NOT NULL,
    `resource_ids` varchar(255) DEFAULT NULL,
    `client_secret` varchar(255) DEFAULT NULL,
    `scope` varchar(255) DEFAULT NULL,
    `authorized_grant_types` varchar(255) DEFAULT NULL,
    `web_server_redirect_uri` varchar(255) DEFAULT NULL,
    `authorities` varchar(255) DEFAULT NULL,
    `access_token_validity` int(11) DEFAULT NULL,
    `refresh_token_validity` int(11) DEFAULT NULL,
    `additional_information` text,
    `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `archived` tinyint(1) DEFAULT '0',
    `trusted` tinyint(1) DEFAULT '0',
    `autoapprove` varchar(255) DEFAULT 'false',
    PRIMARY KEY (`client_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    
    CREATE TABLE `oauth_access_token` (
    `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `token_id` varchar(255) DEFAULT NULL,
    `token` blob,
    `authentication_id` varchar(255) DEFAULT NULL,
    `user_name` varchar(255) DEFAULT NULL,
    `client_id` varchar(255) DEFAULT NULL,
    `authentication` blob,
    `refresh_token` varchar(255) DEFAULT NULL,
    KEY `token_id_index` (`token_id`),
    KEY `authentication_id_index` (`authentication_id`),
    KEY `user_name_index` (`user_name`),
    KEY `client_id_index` (`client_id`),
    KEY `refresh_token_index` (`refresh_token`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    
    CREATE TABLE `oauth_code` (
    `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `code` varchar(255) DEFAULT NULL,
    `authentication` blob,
    KEY `code_index` (`code`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    
    CREATE TABLE `oauth_refresh_token` (
    `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `token_id` varchar(255) DEFAULT NULL,
    `token` blob,
    `authentication` blob,
    KEY `token_id_index` (`token_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    
    CREATE TABLE `order_traveller` (
    `orderId` varchar(32) NOT NULL DEFAULT '',
    `travellerId` varchar(32) NOT NULL DEFAULT '',
    PRIMARY KEY (`orderId`,`travellerId`),
    KEY `travellerId` (`travellerId`),
    CONSTRAINT `order_traveller_ibfk_1` FOREIGN KEY (`orderId`) REFERENCES `orders` (`id`),
    CONSTRAINT `order_traveller_ibfk_2` FOREIGN KEY (`travellerId`) REFERENCES `traveller` (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

  • 相关阅读:
    从一个程序的Bug解析C语言的类型转换
    Expression Blend使用笔刷
    Expression Blend入门
    C#生成CHM文件(中级篇)
    C#生成CHM文件(应用篇)
    C#创建不规则窗体的几种方式
    Web Service学习笔记(2)
    C#生成CHM文件(应用篇)之代码库编辑器(1)
    ASP.NET实际项目演练(1)
    Web Service学习笔记(4)
  • 原文地址:https://www.cnblogs.com/kyousuke/p/13050857.html
Copyright © 2020-2023  润新知