-
Notifications
You must be signed in to change notification settings - Fork 496
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added: DataverseAuthenticatedUser for populating extra information in…
… DataverseUserAdapter
- Loading branch information
Showing
6 changed files
with
110 additions
and
55 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
...-users-spi/src/main/java/edu/harvard/iq/keycloak/auth/spi/DataverseAuthenticatedUser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package edu.harvard.iq.keycloak.auth.spi; | ||
|
||
import jakarta.persistence.*; | ||
|
||
@NamedQueries({ | ||
@NamedQuery(name = "DataverseAuthenticatedUser.findByEmail", | ||
query = "select au from DataverseAuthenticatedUser au WHERE LOWER(au.email)=LOWER(:email)"), | ||
@NamedQuery(name = "DataverseAuthenticatedUser.findByIdentifier", | ||
query = "select au from DataverseAuthenticatedUser au WHERE LOWER(au.userIdentifier)=LOWER(:identifier)"), | ||
}) | ||
@Entity | ||
@Table(name = "authenticateduser") | ||
public class DataverseAuthenticatedUser { | ||
@Id | ||
private String id; | ||
private String email; | ||
private String lastName; | ||
private String firstName; | ||
private String userIdentifier; | ||
|
||
public String getEmail() { | ||
return email; | ||
} | ||
|
||
public String getLastName() { | ||
return lastName; | ||
} | ||
|
||
public String getFirstName() { | ||
return firstName; | ||
} | ||
|
||
public String getUserIdentifier() { | ||
return userIdentifier; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...uiltin-users-spi/src/main/java/edu/harvard/iq/keycloak/auth/spi/DataverseBuiltinUser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package edu.harvard.iq.keycloak.auth.spi; | ||
|
||
import jakarta.persistence.*; | ||
|
||
@NamedQueries({ | ||
@NamedQuery(name = "DataverseUser.findByUsername", | ||
query = "SELECT u FROM DataverseBuiltinUser u WHERE LOWER(u.username)=LOWER(:username)") | ||
}) | ||
@Entity | ||
@Table(name = "builtinuser") | ||
public class DataverseBuiltinUser { | ||
@Id | ||
private String id; | ||
private String username; | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public String getUsername() { | ||
return username; | ||
} | ||
} |
36 changes: 0 additions & 36 deletions
36
...cloak/builtin-users-spi/src/main/java/edu/harvard/iq/keycloak/auth/spi/DataverseUser.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters