Update implementation JWT complete

This commit is contained in:
Chantha 2020-05-19 17:15:25 +07:00
parent 0db885396d
commit 63eee4177a
5 changed files with 25 additions and 22 deletions

View File

@ -2,8 +2,11 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="47c3fbf4-4238-47d3-9ffa-fcd23da4e01e" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/src/main/kotlin/com/chantha/jdbc/utils/jwt/JwtAuthenticationController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/kotlin/com/chantha/jdbc/config/WebConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/kotlin/com/chantha/jdbc/config/WebConfig.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/application.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/application.properties" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/application.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/chantha/jdbc/config/WebConfig.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/chantha/jdbc/config/WebConfig.class" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -93,7 +96,7 @@
<workItem from="1589774040527" duration="72000" />
<workItem from="1589788206287" duration="4024000" />
<workItem from="1589857721932" duration="2546000" />
<workItem from="1589862025987" duration="17838000" />
<workItem from="1589862025987" duration="18632000" />
</task>
<task id="LOCAL-00001" summary="&quot;Add Spring Security to project&quot;">
<created>1589796661163</created>
@ -149,38 +152,38 @@
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="740" y="276" key="FileChooserDialogImpl/0.0.1920.1040@0.0.1920.1040" timestamp="1589879048291" />
<state width="1877" height="420" key="GridCell.Tab.0.bottom" timestamp="1589882691520">
<state width="1877" height="420" key="GridCell.Tab.0.bottom" timestamp="1589883286029">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="420" key="GridCell.Tab.0.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1589882691520" />
<state width="1877" height="420" key="GridCell.Tab.0.center" timestamp="1589882691520">
<state width="1877" height="420" key="GridCell.Tab.0.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1589883286029" />
<state width="1877" height="420" key="GridCell.Tab.0.center" timestamp="1589883286029">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="420" key="GridCell.Tab.0.center/0.0.1920.1040@0.0.1920.1040" timestamp="1589882691520" />
<state width="1877" height="420" key="GridCell.Tab.0.left" timestamp="1589882691520">
<state width="1877" height="420" key="GridCell.Tab.0.center/0.0.1920.1040@0.0.1920.1040" timestamp="1589883286029" />
<state width="1877" height="420" key="GridCell.Tab.0.left" timestamp="1589883286029">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="420" key="GridCell.Tab.0.left/0.0.1920.1040@0.0.1920.1040" timestamp="1589882691520" />
<state width="1877" height="420" key="GridCell.Tab.0.right" timestamp="1589882691520">
<state width="1877" height="420" key="GridCell.Tab.0.left/0.0.1920.1040@0.0.1920.1040" timestamp="1589883286029" />
<state width="1877" height="420" key="GridCell.Tab.0.right" timestamp="1589883286029">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="420" key="GridCell.Tab.0.right/0.0.1920.1040@0.0.1920.1040" timestamp="1589882691520" />
<state width="1877" height="420" key="GridCell.Tab.1.bottom" timestamp="1589882691521">
<state width="1877" height="420" key="GridCell.Tab.0.right/0.0.1920.1040@0.0.1920.1040" timestamp="1589883286029" />
<state width="1877" height="420" key="GridCell.Tab.1.bottom" timestamp="1589883286030">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="420" key="GridCell.Tab.1.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1589882691521" />
<state width="1877" height="420" key="GridCell.Tab.1.center" timestamp="1589882691521">
<state width="1877" height="420" key="GridCell.Tab.1.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1589883286030" />
<state width="1877" height="420" key="GridCell.Tab.1.center" timestamp="1589883286029">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="420" key="GridCell.Tab.1.center/0.0.1920.1040@0.0.1920.1040" timestamp="1589882691521" />
<state width="1877" height="420" key="GridCell.Tab.1.left" timestamp="1589882691521">
<state width="1877" height="420" key="GridCell.Tab.1.center/0.0.1920.1040@0.0.1920.1040" timestamp="1589883286029" />
<state width="1877" height="420" key="GridCell.Tab.1.left" timestamp="1589883286029">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="420" key="GridCell.Tab.1.left/0.0.1920.1040@0.0.1920.1040" timestamp="1589882691521" />
<state width="1877" height="420" key="GridCell.Tab.1.right" timestamp="1589882691521">
<state width="1877" height="420" key="GridCell.Tab.1.left/0.0.1920.1040@0.0.1920.1040" timestamp="1589883286029" />
<state width="1877" height="420" key="GridCell.Tab.1.right" timestamp="1589883286029">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="420" key="GridCell.Tab.1.right/0.0.1920.1040@0.0.1920.1040" timestamp="1589882691521" />
<state width="1877" height="420" key="GridCell.Tab.1.right/0.0.1920.1040@0.0.1920.1040" timestamp="1589883286029" />
<state width="1877" height="326" key="GridCell.Tab.2.bottom" timestamp="1589796703748">
<screen x="0" y="0" width="1920" height="1040" />
</state>

View File

@ -42,8 +42,8 @@ public class WebConfig extends WebSecurityConfigurerAdapter {
http.formLogin();
http.logout().logoutRequestMatcher(new AntPathRequestMatcher("/logout"));
http.authorizeRequests()
.antMatchers("/register").permitAll()
.antMatchers("/**").hasAnyRole("ADMIN");
.antMatchers("/register").permitAll();
// .antMatchers("/**").hasAnyRole("ADMIN");
http.csrf().disable();
http.addFilterBefore(jwtRequestFilter,UsernamePasswordAuthenticationFilter.class);
}

View File

@ -7,7 +7,7 @@ spring.jpa.open-in-view=true
server.port=8081
spring.thymeleaf.cache=true
jwt.secret=javainuse
jwt.secret=$uonCh@nTh@

View File

@ -7,7 +7,7 @@ spring.jpa.open-in-view=true
server.port=8081
spring.thymeleaf.cache=true
jwt.secret=javainuse
jwt.secret=$uonCh@nTh@