Made things compile after ClientDetailsEntity refactoring
parent
a68a4f9796
commit
780839dbf9
|
@ -27,7 +27,7 @@ public interface ClientDetailsEntityService extends ClientDetailsService {
|
|||
|
||||
public ClientDetailsEntity loadClientByClientId(String clientId) throws OAuth2Exception;
|
||||
|
||||
public ClientDetailsEntity createClient(String clientId, String clientSecret, Set<String> scope, Set<String> grantTypes, String redirectUri, Set<GrantedAuthority> authorities, Set<String> resourceIds, String name, String description, boolean allowRefresh, Integer accessTokenTimeout, Integer refreshTokenTimeout, String owner);
|
||||
public ClientDetailsEntity createClient(String clientId, String clientSecret, Set<String> scope, Set<String> grantTypes, String redirectUri, Set<GrantedAuthority> authorities, Set<String> resourceIds, String name, String description, boolean allowRefresh, Integer accessTokenTimeout, Integer refreshTokenTimeout, Set<String> contacts);
|
||||
|
||||
public ClientDetailsEntity createClient(ClientDetailsEntity client);
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
|
@ -84,7 +85,7 @@ public class DefaultOAuth2ClientDetailsEntityService implements ClientDetailsEnt
|
|||
Set<String> scope, Set<String> grantTypes, String redirectUri, Set<GrantedAuthority> authorities,
|
||||
Set<String> resourceIds,
|
||||
String name, String description, boolean allowRefresh, Integer accessTokenTimeout,
|
||||
Integer refreshTokenTimeout, String owner) {
|
||||
Integer refreshTokenTimeout, Set<String> contacts) {
|
||||
|
||||
// TODO: check "owner" locally?
|
||||
|
||||
|
@ -96,13 +97,13 @@ public class DefaultOAuth2ClientDetailsEntityService implements ClientDetailsEnt
|
|||
redirectUris.add(redirectUri);
|
||||
client.setRegisteredRedirectUri(redirectUris);
|
||||
client.setAuthorities(authorities);
|
||||
client.setClientName(name);
|
||||
client.setApplicationName(name);
|
||||
client.setClientDescription(description);
|
||||
client.setAllowRefresh(allowRefresh);
|
||||
client.setAccessTokenValiditySeconds(accessTokenTimeout);
|
||||
client.setRefreshTokenValiditySeconds(refreshTokenTimeout);
|
||||
client.setResourceIds(resourceIds);
|
||||
client.setOwner(owner);
|
||||
client.setContacts(contacts);
|
||||
|
||||
clientRepository.saveClient(client);
|
||||
|
||||
|
|
|
@ -66,7 +66,8 @@ public class ClientAPI {
|
|||
|
||||
ClientDetailsEntity client = new Gson().fromJson(json, ClientDetailsEntity.class);
|
||||
// set owners as current logged in user
|
||||
client.setOwner(principal.getName());
|
||||
//client.setOwner(principal.getName());
|
||||
//TODO: owner has been replaced by a list of contacts, which should be styled as email addresses.
|
||||
m.addAttribute("entity", clientService.saveClient(client));
|
||||
|
||||
return "jsonClientView";
|
||||
|
@ -78,7 +79,8 @@ public class ClientAPI {
|
|||
ClientDetailsEntity client = new Gson().fromJson(json, ClientDetailsEntity.class);
|
||||
client.setClientId(id);
|
||||
// set owners as current logged in user
|
||||
client.setOwner(principal.getName());
|
||||
// client.setOwner(principal.getName());
|
||||
//TODO: owner has been replaced by a list of contacts, which should be styled as email addresses.
|
||||
|
||||
m.addAttribute("entity", clientService.saveClient(client));
|
||||
|
||||
|
|
Loading…
Reference in New Issue