Skip to content

Instantly share code, notes, and snippets.

@darranl
Last active August 29, 2015 14:26
Show Gist options
  • Save darranl/aaca361195553a251a2f to your computer and use it in GitHub Desktop.
Save darranl/aaca361195553a251a2f to your computer and use it in GitHub Desktop.
public interface SecurityRealm {
RealmIdentity createRealmIdentity(String name) throws RealmUnavailableException;
CredentialSupport getCredentialSupport(Class<?> credentialType, String algorithmName) throws RealmUnavailableException;
}
public interface RealmIdentity {
String getName();
CredentialSupport getCredentialSupport(Class<?> credentialType, String algorithmName) throws RealmUnavailableException;
<C> C getCredential(Class<C> credentialType, final String algorithmName) throws RealmUnavailableException;
boolean verifyCredential(Object credential) throws RealmUnavailableException;
boolean exists() throws RealmUnavailableException;
default void dispose() {}
AuthorizationIdentity getAuthorizationIdentity() throws RealmUnavailableException;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment