Skip to content

Commit

Permalink
fix:(jans-auth-server): fixed Client serialization/deserialization bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriyz committed Nov 23, 2022
1 parent 012a29e commit b58339a
Showing 1 changed file with 32 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

package io.jans.as.common.model.registration;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.jans.as.model.common.*;
Expand Down Expand Up @@ -600,6 +601,7 @@ public void setIdTokenTokenBindingCnf(String idTokenTokenBindingCnf) {
this.idTokenTokenBindingCnf = idTokenTokenBindingCnf;
}

@JsonIgnore
public boolean isTokenBindingSupported() {
return StringUtils.isNotBlank(idTokenTokenBindingCnf);
}
Expand Down Expand Up @@ -707,11 +709,32 @@ public LocalizedString getClientNameLocalized() {
return clientNameLocalized;
}

public void setClientNameLocalized(LocalizedString clientNameLocalized) {
this.clientNameLocalized = clientNameLocalized;
}

public void setLogoUriLocalized(LocalizedString logoUriLocalized) {
this.logoUriLocalized = logoUriLocalized;
}

public void setClientUriLocalized(LocalizedString clientUriLocalized) {
this.clientUriLocalized = clientUriLocalized;
}

public void setPolicyUriLocalized(LocalizedString policyUriLocalized) {
this.policyUriLocalized = policyUriLocalized;
}

public void setTosUriLocalized(LocalizedString tosUriLocalized) {
this.tosUriLocalized = tosUriLocalized;
}

/**
* Sets the name of the Client to be presented to the user.
*
* @param clientName The name of the Client to be presented to the user.
*/
@JsonIgnore
public void setClientNameLocalized(String clientName) {
this.clientName = clientName;
this.clientNameLocalized.setValue(clientName);
Expand All @@ -723,6 +746,7 @@ public void setClientNameLocalized(String clientName) {
* @param clientName The name of the Client to be presented to the user.
* @param locale The locale
*/
@JsonIgnore
public void setClientNameLocalized(String clientName, Locale locale) {
if (StringUtils.isNotBlank(locale.toString())) {
this.clientNameLocalized.setValue(clientName, locale);
Expand All @@ -745,6 +769,7 @@ public LocalizedString getLogoUriLocalized() {
*
* @param logoUri The URL of a logo image for the Client where it can be retrieved.
*/
@JsonIgnore
public void setLogoUriLocalized(String logoUri) {
this.logoUri = logoUri;
this.logoUriLocalized.setValue(logoUri);
Expand All @@ -756,6 +781,7 @@ public void setLogoUriLocalized(String logoUri) {
* @param logoUri The URL of a logo image for the Client where it can be retrieved.
* @param locale The locale
*/
@JsonIgnore
public void setLogoUriLocalized(String logoUri, Locale locale) {
if (StringUtils.isNotBlank(locale.toString())) {
this.logoUriLocalized.setValue(logoUri, locale);
Expand All @@ -778,6 +804,7 @@ public LocalizedString getClientUriLocalized() {
*
* @param clientUri The URL of the home page of the Client.
*/
@JsonIgnore
public void setClientUriLocalized(String clientUri) {
this.clientUri = clientUri;
this.clientUriLocalized.setValue(clientUri);
Expand All @@ -789,6 +816,7 @@ public void setClientUriLocalized(String clientUri) {
* @param clientUri The URL of the home page of the Client.
* @param locale The locale
*/
@JsonIgnore
public void setClientUriLocalized(String clientUri, Locale locale) {
if (StringUtils.isNotBlank(locale.toString())) {
this.clientUriLocalized.setValue(clientUri, locale);
Expand All @@ -813,6 +841,7 @@ public LocalizedString getPolicyUriLocalized() {
*
* @param policyUri A URL location about how the profile data will be used.
*/
@JsonIgnore
public void setPolicyUriLocalized(String policyUri) {
this.policyUri = policyUri;
this.policyUriLocalized.setValue(policyUri);
Expand All @@ -825,6 +854,7 @@ public void setPolicyUriLocalized(String policyUri) {
* @param policyUri A URL location about how the profile data will be used.
* @param locale The locale
*/
@JsonIgnore
public void setPolicyUriLocalized(String policyUri, Locale locale) {
if (StringUtils.isNotBlank(locale.toString())) {
this.policyUriLocalized.setValue(policyUri, locale);
Expand All @@ -849,6 +879,7 @@ public LocalizedString getTosUriLocalized() {
*
* @param tosUri The terms of service URL.
*/
@JsonIgnore
public void setTosUriLocalized(String tosUri) {
this.tosUri = tosUri;
this.tosUriLocalized.setValue(tosUri);
Expand All @@ -861,6 +892,7 @@ public void setTosUriLocalized(String tosUri) {
* @param tosUri The terms of service URL.
* @param locale The Locale
*/
@JsonIgnore
public void setTosUriLocalized(String tosUri, Locale locale) {
if (StringUtils.isNotBlank(locale.toString())) {
this.tosUriLocalized.setValue(tosUri, locale);
Expand Down Expand Up @@ -1421,14 +1453,6 @@ public void setBackchannelUserCodeParameter(Boolean backchannelUserCodeParameter
this.backchannelUserCodeParameter = backchannelUserCodeParameter;
}

public String getDisplayName() {
return getClientName();
}

public void setDisplayName(String displayName) {
setClientName(displayName);
}

public String getDescription() {
return description;
}
Expand Down

0 comments on commit b58339a

Please sign in to comment.