接口 AuthPluginService
-
public interface AuthPluginServiceAuth service.- 作者:
- Wuyfee, xiweng.yy
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 booleanenableAuth(ActionTypes action, java.lang.String type)Judgement whether this plugin enable auth for this action and type.java.lang.StringgetAuthServiceName()AuthPluginService Name which for conveniently find AuthPluginService instance.java.util.Collection<java.lang.String>identityNames()Define which identity information needed from request. e.q: username, password, accessToken.default booleanisLoginEnabled()Is the plugin enable login.java.lang.BooleanvalidateAuthority(IdentityContext identityContext, Permission permission)Validate the identity whether has the resource authority.booleanvalidateIdentity(IdentityContext identityContext, Resource resource)To validate whether the identity context from request is legal or illegal.
-
-
-
方法详细资料
-
identityNames
java.util.Collection<java.lang.String> identityNames()
Define which identity information needed from request. e.q: username, password, accessToken.- 返回:
- identity names
-
enableAuth
boolean enableAuth(ActionTypes action, java.lang.String type)
Judgement whether this plugin enable auth for this action and type.- 参数:
action- action of request, seeActionTypestype- type of request, seeSignType- 返回:
-
validateIdentity
boolean validateIdentity(IdentityContext identityContext, Resource resource) throws AccessException
To validate whether the identity context from request is legal or illegal.- 参数:
identityContext- where we can find the user informationresource- resource about this user information- 返回:
trueif legal, otherwisefalse- 抛出:
AccessException- if authentication is failed
-
validateAuthority
java.lang.Boolean validateAuthority(IdentityContext identityContext, Permission permission) throws AccessException
Validate the identity whether has the resource authority.- 参数:
identityContext- where we can find the user information.permission- permission to auth.- 返回:
- Boolean if the user has the resource authority.
- 抛出:
AccessException- if authentication is failed
-
getAuthServiceName
java.lang.String getAuthServiceName()
AuthPluginService Name which for conveniently find AuthPluginService instance.- 返回:
- AuthServiceName mark a AuthPluginService instance.
-
isLoginEnabled
default boolean isLoginEnabled()
Is the plugin enable login.- 返回:
trueif plugin need login, otherwisefalse- 从以下版本开始:
- 2.2.2
-
-