public class ShiroAuthProviderImpl extends Object implements ShiroAuthProvider
| Constructor and Description |
|---|
ShiroAuthProviderImpl(Vertx vertx,
ShiroAuthRealm realm) |
ShiroAuthProviderImpl(Vertx vertx,
ShiroAuthRealmType realmType,
JsonObject config) |
| Modifier and Type | Method and Description |
|---|---|
void |
hasPermission(JsonObject principal,
String permission,
Handler<AsyncResult<Boolean>> resultHandler)
Handle whether a principal has a permission
|
void |
hasRole(JsonObject principal,
String role,
Handler<AsyncResult<Boolean>> resultHandler)
Handle whether a principal has a role
|
void |
login(JsonObject principal,
JsonObject credentials,
Handler<AsyncResult<Void>> resultHandler)
Handle the actual login
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, createpublic ShiroAuthProviderImpl(Vertx vertx, ShiroAuthRealmType realmType, JsonObject config)
public ShiroAuthProviderImpl(Vertx vertx, ShiroAuthRealm realm)
public void login(JsonObject principal, JsonObject credentials, Handler<AsyncResult<Void>> resultHandler)
AuthProviderlogin in interface AuthProviderprincipal - represents the unique id (e.g. username) of the user being logged incredentials - the credentials - this can contain anything your provider expects, e.g. passwordresultHandler - - this must return a failed result if login fails and it must return a succeeded result if the
login succeedspublic void hasRole(JsonObject principal, String role, Handler<AsyncResult<Boolean>> resultHandler)
AuthProviderhasRole in interface AuthProviderprincipal - represents the unique id (e.g. username) of the user being logged inrole - the roleresultHandler - this must return a failure if the check could not be performed - e.g. the principal is not
known. Otherwise it must return a succeeded result which contains a boolean `true` if the
principal has the role, or `false` if they do not have the role.public void hasPermission(JsonObject principal, String permission, Handler<AsyncResult<Boolean>> resultHandler)
AuthProviderhasPermission in interface AuthProviderprincipal - represents the unique id (e.g. username) of the user being logged inpermission - the permissionresultHandler - this must return a failure if the check could not be performed - e.g. the principal is not
known. Otherwise it must return a succeeded result which contains a boolean `true` if the
principal has the permission, or `false` if they do not have the permission.Copyright © 2015. All Rights Reserved.