public interface AuthPluginService
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
enableAuth(ActionTypes action,
String type)
Judgement whether this plugin enable auth for this action and type.
|
String |
getAuthServiceName()
AuthPluginService Name which for conveniently find AuthPluginService instance.
|
Collection<String> |
identityNames()
Define which identity information needed from request. e.q: username, password, accessToken.
|
default boolean |
isLoginEnabled()
Is the plugin enable login.
|
Boolean |
validateAuthority(IdentityContext identityContext,
Permission permission)
Validate the identity whether has the resource authority.
|
boolean |
validateIdentity(IdentityContext identityContext,
Resource resource)
To validate whether the identity context from request is legal or illegal.
|
Collection<String> identityNames()
boolean enableAuth(ActionTypes action, String type)
action - action of request, see ActionTypestype - type of request, see SignTypetrue if enable auth, otherwise falseboolean validateIdentity(IdentityContext identityContext, Resource resource) throws AccessException
identityContext - where we can find the user informationresource - resource about this user informationtrue if legal, otherwise falseAccessException - if authentication is failedBoolean validateAuthority(IdentityContext identityContext, Permission permission) throws AccessException
identityContext - where we can find the user information.permission - permission to auth.AccessException - if authentication is failedString getAuthServiceName()
default boolean isLoginEnabled()
true if plugin need login, otherwise falseCopyright © 2018–2023 Alibaba Group. All rights reserved.