Commit e47c0f12 authored by Matija Obreza's avatar Matija Obreza

Added setters to OAuthClient for Jackson deserialization

parent 566f5e64
...@@ -79,7 +79,7 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth ...@@ -79,7 +79,7 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth
/** The resource ids. */ /** The resource ids. */
@JsonView(JsonViews.Protected.class) @JsonView(JsonViews.Protected.class)
@Transient @Transient
private final Set<String> resourceIds = new HashSet<>(); private Set<String> resourceIds = new HashSet<>();
/** The auto approve. */ /** The auto approve. */
@Column(nullable = false) @Column(nullable = false)
...@@ -93,7 +93,7 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth ...@@ -93,7 +93,7 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth
/** The auto approve scopes. */ /** The auto approve scopes. */
@JsonView(JsonViews.Protected.class) @JsonView(JsonViews.Protected.class)
@Transient @Transient
private final Set<String> autoApproveScopes = new HashSet<>(); private Set<String> autoApproveScopes = new HashSet<>();
/** The scope. */ /** The scope. */
@JsonIgnore @JsonIgnore
...@@ -103,7 +103,7 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth ...@@ -103,7 +103,7 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth
/** The scopes. */ /** The scopes. */
@JsonView(JsonViews.Protected.class) @JsonView(JsonViews.Protected.class)
@Transient @Transient
private final Set<String> scopes = new HashSet<>(); private Set<String> scopes = new HashSet<>();
/** The grants. */ /** The grants. */
@JsonIgnore @JsonIgnore
...@@ -113,7 +113,7 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth ...@@ -113,7 +113,7 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth
/** The grant types. */ /** The grant types. */
@JsonView(JsonViews.Protected.class) @JsonView(JsonViews.Protected.class)
@Transient @Transient
private final Set<String> grantTypes = new HashSet<>(); private Set<String> grantTypes = new HashSet<>();
/** The redirect. */ /** The redirect. */
@JsonIgnore @JsonIgnore
...@@ -123,7 +123,7 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth ...@@ -123,7 +123,7 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth
/** The redirect uris. */ /** The redirect uris. */
@JsonView(JsonViews.Protected.class) @JsonView(JsonViews.Protected.class)
@Transient @Transient
private final Set<String> redirectUris = new HashSet<>(); private Set<String> redirectUris = new HashSet<>();
/** The roles. */ /** The roles. */
@JsonView(JsonViews.Protected.class) @JsonView(JsonViews.Protected.class)
...@@ -135,7 +135,7 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth ...@@ -135,7 +135,7 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth
/** The additional information. */ /** The additional information. */
@Transient @Transient
private final Map<String, Object> additionalInformation = null; private Map<String, Object> additionalInformation = null;
/** The access token validity. */ /** The access token validity. */
private Integer accessTokenValidity; private Integer accessTokenValidity;
...@@ -360,6 +360,10 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth ...@@ -360,6 +360,10 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth
public Set<String> getAutoApproveScopes() { public Set<String> getAutoApproveScopes() {
return autoApproveScopes; return autoApproveScopes;
} }
public void setAutoApproveScopes(Set<String> autoApproveScopes) {
this.autoApproveScopes = autoApproveScopes;
}
/* /*
* (non-Javadoc) * (non-Javadoc)
...@@ -370,6 +374,10 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth ...@@ -370,6 +374,10 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth
public Set<String> getResourceIds() { public Set<String> getResourceIds() {
return resourceIds; return resourceIds;
} }
public void setResourceIds(Set<String> resourceIds) {
this.resourceIds = resourceIds;
}
/** /**
* Client secret is required when provided. * Client secret is required when provided.
...@@ -398,6 +406,10 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth ...@@ -398,6 +406,10 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth
public Set<String> getScope() { public Set<String> getScope() {
return scopes; return scopes;
} }
public void setScopes(Set<String> scopes) {
this.scopes = scopes;
}
/* /*
* (non-Javadoc) * (non-Javadoc)
...@@ -408,6 +420,10 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth ...@@ -408,6 +420,10 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth
public Set<String> getAuthorizedGrantTypes() { public Set<String> getAuthorizedGrantTypes() {
return grantTypes; return grantTypes;
} }
public void setGrantTypes(Set<String> grantTypes) {
this.grantTypes = grantTypes;
}
/* /*
* (non-Javadoc) * (non-Javadoc)
...@@ -419,6 +435,11 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth ...@@ -419,6 +435,11 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth
return redirectUris; return redirectUris;
} }
public void setRedirectUris(Set<String> redirectUris) {
this.redirectUris = redirectUris;
}
/* /*
* (non-Javadoc) * (non-Javadoc)
* @see * @see
...@@ -505,7 +526,11 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth ...@@ -505,7 +526,11 @@ public class OAuthClient extends AclSid implements ClientDetails, Copyable<OAuth
public Map<String, Object> getAdditionalInformation() { public Map<String, Object> getAdditionalInformation() {
return additionalInformation; return additionalInformation;
} }
public void setAdditionalInformation(Map<String, Object> additionalInformation) {
this.additionalInformation = additionalInformation;
}
/** /**
* Sets the title. * Sets the title.
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment