Package com.linecorp.armeria.server.auth
Class AuthService
java.lang.Object
com.linecorp.armeria.common.util.AbstractUnwrappable<Service<T_I,T_O>>
com.linecorp.armeria.server.DecoratingService<I,O,I,O>
com.linecorp.armeria.server.SimpleDecoratingService<HttpRequest,HttpResponse>
com.linecorp.armeria.server.SimpleDecoratingHttpService
com.linecorp.armeria.server.auth.AuthService
- All Implemented Interfaces:
Unwrappable,HttpService,Service<HttpRequest,HttpResponse>
public final class AuthService extends SimpleDecoratingHttpService
Decorates an
HttpService to provide HTTP authorization functionality.- See Also:
AuthServiceBuilder
-
Method Summary
Modifier and Type Method Description static AuthServiceBuilderbuilder()Returns a newAuthServiceBuilder.static Function<? super HttpService,AuthService>newDecorator(Authorizer<HttpRequest>... authorizers)Creates a new HTTP authorizationHttpServicedecorator using the specifiedAuthorizers.static Function<? super HttpService,AuthService>newDecorator(Iterable<? extends Authorizer<HttpRequest>> authorizers)Creates a new HTTP authorizationHttpServicedecorator using the specifiedAuthorizers.HttpResponseserve(ServiceRequestContext ctx, HttpRequest req)Serves an incomingRequest.Methods inherited from class com.linecorp.armeria.server.DecoratingService
serviceAdded, shouldCachePathMethods inherited from class com.linecorp.armeria.common.util.AbstractUnwrappable
as, toString, unwrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.linecorp.armeria.server.HttpService
decorate, decorateMethods inherited from interface com.linecorp.armeria.server.Service
as, serviceAdded, shouldCachePath, unwrap
-
Method Details
-
newDecorator
public static Function<? super HttpService,AuthService> newDecorator(Iterable<? extends Authorizer<HttpRequest>> authorizers)Creates a new HTTP authorizationHttpServicedecorator using the specifiedAuthorizers.- Parameters:
authorizers- a list ofAuthorizers.
-
newDecorator
@SafeVarargs public static Function<? super HttpService,AuthService> newDecorator(Authorizer<HttpRequest>... authorizers)Creates a new HTTP authorizationHttpServicedecorator using the specifiedAuthorizers.- Parameters:
authorizers- the array ofAuthorizers.
-
builder
Returns a newAuthServiceBuilder. -
serve
Description copied from interface:ServiceServes an incomingRequest.
-