Interface Authorizer
public interface Authorizer
Provides the interface for authorizing a user per request.
- Author:
- Marc de Lignie
-
Method Summary
Modifier and TypeMethodDescriptiondefault Stringvoidauthorize(AuthenticatedUser user, RequestMessage msg) Checks whether a user is authorized to have a script request from a gremlin client answered and raises anAuthorizationExceptionif this is not the case.voidThis method is called once upon system startup to initialize theAuthorizer.
-
Method Details
-
setup
This method is called once upon system startup to initialize theAuthorizer.- Throws:
AuthorizationException
-
authorize
default String authorize(AuthenticatedUser user, String gremlin, Map<String, String> aliases) throws AuthorizationException- Throws:
AuthorizationException
-
authorize
Checks whether a user is authorized to have a script request from a gremlin client answered and raises anAuthorizationExceptionif this is not the case.- Parameters:
user-AuthenticatedUserthat needs authorization.msg-RequestMessagein which theTokens.ARGS_GREMLIN argument can contain an arbitrary succession of script statements.- Throws:
AuthorizationException
-