added defaults for SECOAUTH

pull/210/head
Justin Richer 2012-08-27 16:09:01 -04:00
parent 9f84126cb8
commit 83873f8ae2
1 changed files with 8 additions and 0 deletions

View File

@ -213,6 +213,14 @@ public class ClientDynamicRegistrationEndpoint {
client.setRequireAuthTime(requireAuthTime);
client.setDefaultACR(defaultAcr);
// defaults for SECOAUTH functionality
// TODO: extensions to request, or configuration?
client.setScope(Sets.newHashSet("openid", "phone", "address", "profile", "email")); // provision all scopes
client.setAllowRefresh(true); // by default allow refresh tokens on dynamic clients
client.setAccessTokenValiditySeconds(3600); // access tokens good for 1hr
client.setIdTokenValiditySeconds(600); // id tokens good for 10min
client.setRefreshTokenValiditySeconds(null); // refresh tokens good until revoked
client.setDynamicallyRegistered(true);
ClientDetailsEntity saved = clientService.saveNewClient(client);