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

Cleanup

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