Commit 120082ce authored by Matija Obreza's avatar Matija Obreza
Browse files

Cleanup

parent ac126b9b
...@@ -25,8 +25,9 @@ import org.genesys2.server.model.BusinessModel; ...@@ -25,8 +25,9 @@ import org.genesys2.server.model.BusinessModel;
@Entity @Entity
@Table(name = "authorities") @Table(name = "authorities")
public class OAuthAuthorities extends BusinessModel{ public class OAuthAuthorities extends BusinessModel{
private static final long serialVersionUID = 1637383923219682635L;
@Column(name = "username") @Column(name = "username")
private String username; private String username;
@Column(name = "authority") @Column(name = "authority")
......
...@@ -42,8 +42,9 @@ import org.springframework.util.StringUtils; ...@@ -42,8 +42,9 @@ import org.springframework.util.StringUtils;
@Entity @Entity
@Table(name = "oauth_client_details") @Table(name = "oauth_client_details")
public class OAuthClientDetails implements ClientDetails { public class OAuthClientDetails implements ClientDetails {
private static final long serialVersionUID = 5328458631619687041L;
@Id @Id
@Column(name = "client_id", unique = true, nullable = false) @Column(name = "client_id", unique = true, nullable = false)
private String clientId; private String clientId;
...@@ -190,10 +191,6 @@ public class OAuthClientDetails implements ClientDetails { ...@@ -190,10 +191,6 @@ public class OAuthClientDetails implements ClientDetails {
} }
} }
private List<String> getAuthoritiesAsStrings() {
return new ArrayList<String>(AuthorityUtils.authorityListToSet(AuthorityUtils.createAuthorityList(authorities)));
}
public void setAuthorities(String authorities) { public void setAuthorities(String authorities) {
this.authorities = authorities; this.authorities = authorities;
} }
......
...@@ -29,8 +29,9 @@ import org.genesys2.server.model.HibernateModel; ...@@ -29,8 +29,9 @@ import org.genesys2.server.model.HibernateModel;
@Entity @Entity
@Table(name = "oauth_client_token") @Table(name = "oauth_client_token")
public class OAuthClientToken implements HibernateModel { public class OAuthClientToken implements HibernateModel {
private static final long serialVersionUID = 8810301060389684282L;
@Id @Id
@Column(name = "token_id", unique = true, nullable = false) @Column(name = "token_id", unique = true, nullable = false)
private String tokenId; private String tokenId;
......
...@@ -29,8 +29,9 @@ import org.genesys2.server.model.HibernateModel; ...@@ -29,8 +29,9 @@ import org.genesys2.server.model.HibernateModel;
@Entity @Entity
@Table(name = "oauth_code") @Table(name = "oauth_code")
public class OAuthCode implements HibernateModel { public class OAuthCode implements HibernateModel {
private static final long serialVersionUID = 8018089692223912764L;
@Id @Id
@Column(name = "code", unique = true, nullable = false) @Column(name = "code", unique = true, nullable = false)
private String code; private String code;
......
...@@ -29,8 +29,9 @@ import org.genesys2.server.model.HibernateModel; ...@@ -29,8 +29,9 @@ import org.genesys2.server.model.HibernateModel;
@Entity @Entity
@Table(name = "oauth_refresh_token") @Table(name = "oauth_refresh_token")
public class OAuthRefreshToken implements HibernateModel { public class OAuthRefreshToken implements HibernateModel {
private static final long serialVersionUID = -5779707306510231956L;
@Id @Id
@Column(name = "token_id", unique = true, nullable = false) @Column(name = "token_id", unique = true, nullable = false)
private String tokenId; private String tokenId;
......
...@@ -18,7 +18,6 @@ package org.genesys2.server.persistence.domain; ...@@ -18,7 +18,6 @@ package org.genesys2.server.persistence.domain;
import java.util.Collection; import java.util.Collection;
import org.genesys2.server.model.impl.User;
import org.genesys2.server.model.oauth.OAuthAccessToken; import org.genesys2.server.model.oauth.OAuthAccessToken;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.security.oauth2.common.OAuth2AccessToken; import org.springframework.security.oauth2.common.OAuth2AccessToken;
...@@ -29,6 +28,6 @@ public interface OAuthAccessTokenPersistence extends JpaRepository<OAuthAccessTo ...@@ -29,6 +28,6 @@ public interface OAuthAccessTokenPersistence extends JpaRepository<OAuthAccessTo
Collection<OAuthAccessToken> findByClientId(String clientId); Collection<OAuthAccessToken> findByClientId(String clientId);
Collection<OAuth2AccessToken> findByUser(User user); Collection<OAuth2AccessToken> findByUserName(String username);
} }
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