This repository has been archived by the owner on Mar 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use JDBC store for OAuth2 tokens by default jmix-framework/jmix#214
- Loading branch information
1 parent
905be97
commit a7e044b
Showing
5 changed files
with
132 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
35 changes: 35 additions & 0 deletions
35
security-oauth2/src/main/resources/io/jmix/securityoauth2/liquibase/changelog.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright 2020 Haulmont. | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<databaseChangeLog | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog | ||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd"> | ||
|
||
<property name="uuid.type" dbms="oracle" value="varchar2(32)"/> | ||
<property name="uuid.type" dbms="!oracle" value="uuid"/> | ||
<property name="byte[].type" dbms="mysql" value="BLOB"/> | ||
<property name="byte[].type" dbms="mariadb" value="BLOB"/> | ||
<property name="byte[].type" dbms="postgresql" value="bytea"/> | ||
<property name="byte[].type" dbms="mssql" value="varbinary(max)"/> | ||
<property name="byte[].type" dbms="oracle" value="BLOB"/> | ||
<property name="byte[].type" dbms="hsqldb" value="BLOB"/> | ||
|
||
<include file="/io/jmix/securityoauth2/liquibase/changelog/001-security-oauth2.xml"/> | ||
|
||
</databaseChangeLog> |
46 changes: 46 additions & 0 deletions
46
...th2/src/main/resources/io/jmix/securityoauth2/liquibase/changelog/001-security-oauth2.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright 2020 Haulmont. | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<databaseChangeLog | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog | ||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd"> | ||
|
||
<changeSet author="security-oauth2" id="1"> | ||
<createTable tableName="oauth_access_token"> | ||
<column name="authentication_id" type="varchar(255)"> | ||
<constraints primaryKey="true" nullable="false"/> | ||
</column> | ||
<column name="token_id" type="varchar(255)"> | ||
<constraints nullable="false"/> | ||
</column> | ||
<column name="token" type="${byte[].type}"/> | ||
<column name="user_name" type="varchar(255)"/> | ||
<column name="client_id" type="varchar(255)"/> | ||
<column name="authentication" type="${byte[].type}"/> | ||
<column name="refresh_token" type="varchar(255)"/> | ||
</createTable> | ||
<createTable tableName="oauth_refresh_token"> | ||
<column name="token_id" type="varchar(255)"> | ||
<constraints primaryKey="true" nullable="false"/> | ||
</column> | ||
<column name="token" type="${byte[].type}"/> | ||
<column name="authentication" type="${byte[].type}"/> | ||
</createTable> | ||
</changeSet> | ||
</databaseChangeLog> |
17 changes: 17 additions & 0 deletions
17
security-oauth2/src/main/resources/io/jmix/securityoauth2/module.properties
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# | ||
# Copyright 2020 Haulmont. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
main.datasource.studio.liquibase.excludePrefixes=oauth_access_token,oauth_refresh_token |