Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Backend
Commits
19633967
Commit
19633967
authored
Jan 16, 2014
by
Matija Obreza
Browse files
Include 'refresh_token' in default OAuth client
parent
b91c649e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/genesys2/server/listener/sample/CreateClientDetailsListener.java
View file @
19633967
...
...
@@ -42,8 +42,12 @@ public class CreateClientDetailsListener implements InitializingBean {
clientDetails
.
setClientId
(
DEFAULT_CLIENT_DETAILS_ID
);
clientDetails
.
setClientSecret
(
"0xcafebabe"
);
clientDetails
.
setScope
(
"read,write"
);
clientDetails
.
setAuthorizedGrantTypes
(
"authorization_code"
);
clientDetails
.
setAuthorities
(
"ROLE_USER"
);
clientDetails
.
setAuthorizedGrantTypes
(
"authorization_code,refresh_token"
);
// 50 days
clientDetails
.
setRefreshTokenValiditySeconds
(
50
*
24
*
60
*
60
);
// 7 days
clientDetails
.
setAccessTokenValiditySeconds
(
7
*
24
*
60
*
60
);
clientDetails
.
setAuthorities
(
"USER"
);
clientDetailsService
.
addClientDetails
(
clientDetails
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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