@Override public ClientDetails loadClientByClientId(String clientId) { BaseClientDetails clientDetails = new BaseClientDetails(); clientDetails.setClientId(CLIENT_ID); clientDetails.setClientSecret(CLIENT_SECRET); clientDetails.setAuthorizedGrantTypes(Arrays.asList(GRANT_TYPES)); return clientDetails; }
private ClientDetails removeSecret(ClientDetails client) { BaseClientDetails details = new BaseClientDetails(); details.setClientId(client.getClientId()); details.setScope(client.getScope()); details.setResourceIds(client.getResourceIds()); details.setAuthorizedGrantTypes(client.getAuthorizedGrantTypes()); details.setRegisteredRedirectUri(client.getRegisteredRedirectUri()); details.setAuthorities(client.getAuthorities()); details.setAccessTokenValiditySeconds(client.getAccessTokenValiditySeconds()); return details; }
public BaseClientDetails(ClientDetails prototype) { this(); setAccessTokenValiditySeconds(prototype.getAccessTokenValiditySeconds()); setRefreshTokenValiditySeconds(prototype.getRefreshTokenValiditySeconds()); setAuthorities(prototype.getAuthorities()); setAuthorizedGrantTypes(prototype.getAuthorizedGrantTypes()); setClientId(prototype.getClientId()); setClientSecret(prototype.getClientSecret()); setRegisteredRedirectUri(prototype.getRegisteredRedirectUri()); setScope(prototype.getScope()); setResourceIds(prototype.getResourceIds()); }