public final class SliceAuth extends Object implements Slice
Example: the class which allows upload only for users with 'upload' permissions and resolves user identity by "http-basic" mechanism:
new SliceAuth(
new SliceUpload(storage),
new Permission.ByName("upload", permissions),
new AuthBasic(passwords)
);
Slice.Wrap| Constructor and Description |
|---|
SliceAuth(Slice origin,
Permission perm,
Identities ids)
Ctor.
|
| Modifier and Type | Method and Description |
|---|---|
Response |
response(String line,
Iterable<Map.Entry<String,String>> headers,
org.reactivestreams.Publisher<ByteBuffer> body)
Respond to a http request.
|
public SliceAuth(Slice origin, Permission perm, Identities ids)
origin - Origin sliceperm - Authorization mechanismids - Authentication mechanismCopyright © 2012–2020 jcabi.com. All rights reserved.