OAuth 2.0 Cookbook: Protect your web applications using Spring Security by Adolfo Eloy Nascimento

OAuth 2.0 Cookbook: Protect your web applications using Spring Security by Adolfo Eloy Nascimento

Author:Adolfo Eloy Nascimento [Nascimento, Adolfo Eloy]
Language: eng
Format: azw3
Tags: COM053000 - COMPUTERS / Security / General, COM051440 - COMPUTERS / Software Development and Engineering / Tools, COM061000 - COMPUTERS / Client-Server Computing
Publisher: Packt Publishing
Published: 2017-10-18T04:00:00+00:00


private String softwareId;

private String tokenEndpointAuthMethod;

private Set<String> responseTypes = new HashSet<>();

private String clientName;

private String clientUri;

private long clientSecretExpiresAt;

Create the following setters (the getters for these fields should be ordinary getters that just return their respective attribute values):

public void setSoftwareId(String softwareId) {

this.softwareId = softwareId;

additionalInformation.put("software_id", softwareId);

}

public void setTokenEndpointAuthMethod(String tokenEndpointAuthMethod) {

this.tokenEndpointAuthMethod = tokenEndpointAuthMethod;

additionalInformation.put("token_endpoint_auth_method", tokenEndpointAuthMethod);

}

public void setResponseTypes(Set<String> responseTypes) {

this.responseTypes = responseTypes;

additionalInformation.put("response_types", getResponseTypes());

}

public void setClientName(String clientName) {

this.clientName = clientName;

additionalInformation.put("client_name", clientName);

}

public void setClientUri(String clientUri) {

this.clientUri = clientUri;

additionalInformation.put("client_uri", clientUri);

}

public void setClientSecretExpiresAt(long clientSecretExpiresAt) {

this.clientSecretExpiresAt = clientSecretExpiresAt;

additionalInformation.put("client_secret_expires_at",

Long.toString(clientSecretExpiresAt));

}

Create getters and setters for the remaining attributes.

Make sure the following attribute accessors and modifiers are the same for your DynamicClientDetails implementation:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.