2018-03-04 22:43:22 +00:00
|
|
|
package org.keycloak.models;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Session note metadata for impersonation details stored in user session notes.
|
|
|
|
*/
|
|
|
|
public enum ImpersonationSessionNote implements UserSessionNoteDescriptor {
|
|
|
|
IMPERSONATOR_ID("Impersonator User ID"),
|
2022-08-15 20:10:30 +00:00
|
|
|
IMPERSONATOR_USERNAME("Impersonator Username"),
|
|
|
|
IMPERSONATOR_CLIENT("Impersonator Client");
|
2018-03-04 22:43:22 +00:00
|
|
|
|
|
|
|
final String displayName;
|
|
|
|
|
|
|
|
ImpersonationSessionNote(String displayName) {
|
|
|
|
this.displayName = displayName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getDisplayName() {
|
|
|
|
return displayName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getTokenClaim() {
|
|
|
|
return this.toString().toLowerCase().replace('_', '.');
|
|
|
|
}
|
|
|
|
}
|