added authentication via api key for some limited api methods (fix #64)

This commit is contained in:
Athou
2013-05-01 21:56:59 +02:00
parent 52a8ea1920
commit 5dcc923cf1
14 changed files with 148 additions and 40 deletions

View File

@@ -31,6 +31,9 @@ public class User extends AbstractModel {
@Column(length = 256, nullable = false)
private byte[] password;
@Column(length = 40, unique = true)
private String apiKey;
@Column(length = 8, nullable = false)
private byte[] salt;
@@ -99,4 +102,12 @@ public class User extends AbstractModel {
this.lastLogin = lastLogin;
}
public String getApiKey() {
return apiKey;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
}