Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
apollo
Commits
2b49ae56
Commit
2b49ae56
authored
Sep 11, 2017
by
张乐
Committed by
GitHub
Sep 11, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #754 from nobodyiam/fix-table-case
fix table case
parents
88494d7d
de034352
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
AuthConfiguration.java
...rk/apollo/portal/spi/configuration/AuthConfiguration.java
+12
-2
No files found.
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/AuthConfiguration.java
View file @
2b49ae56
...
@@ -211,10 +211,20 @@ public class AuthConfiguration {
...
@@ -211,10 +211,20 @@ public class AuthConfiguration {
@Bean
@Bean
public
JdbcUserDetailsManager
jdbcUserDetailsManager
(
AuthenticationManagerBuilder
auth
,
DataSource
datasource
)
throws
Exception
{
public
JdbcUserDetailsManager
jdbcUserDetailsManager
(
AuthenticationManagerBuilder
auth
,
DataSource
datasource
)
throws
Exception
{
return
auth
.
jdbcAuthentication
().
passwordEncoder
(
new
BCryptPasswordEncoder
()).
dataSource
(
datasource
)
JdbcUserDetailsManager
jdbcUserDetailsManager
=
auth
.
jdbcAuthentication
().
passwordEncoder
(
new
BCryptPasswordEncoder
()).
dataSource
(
datasource
)
.
usersByUsernameQuery
(
"select Username,Password,Enabled from `Users` where Username
=
?"
)
.
usersByUsernameQuery
(
"select Username,Password,Enabled from `Users` where Username
=
?"
)
.
authoritiesByUsernameQuery
(
"select Username,Authority from `Authorities` where Username = ?"
)
.
authoritiesByUsernameQuery
(
"select Username,Authority from `Authorities` where Username = ?"
)
.
getUserDetailsService
();
.
getUserDetailsService
();
jdbcUserDetailsManager
.
setUserExistsSql
(
"select Username from `Users` where Username = ?"
);
jdbcUserDetailsManager
.
setCreateUserSql
(
"insert into `Users` (Username, Password, Enabled) values (?,?,?)"
);
jdbcUserDetailsManager
.
setUpdateUserSql
(
"update `Users` set Password = ?, Enabled = ? where Username = ?"
);
jdbcUserDetailsManager
.
setDeleteUserSql
(
"delete from `Users` where Username = ?"
);
jdbcUserDetailsManager
.
setCreateAuthoritySql
(
"insert into `Authorities` (Username, Authority) values (?,?)"
);
jdbcUserDetailsManager
.
setDeleteUserAuthoritiesSql
(
"delete from `Authorities` where Username = ?"
);
jdbcUserDetailsManager
.
setChangePasswordSql
(
"update `Users` set Password = ? where Username = ?"
);
return
jdbcUserDetailsManager
;
}
}
@Bean
@Bean
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment