sirius.web.security.ScopeDetector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sirius-web Show documentation
Show all versions of sirius-web Show documentation
Provides a modern and scalable web server as SIRIUS module
/*
* Made with all the love in the world
* by scireum in Remshalden, Germany
*
* Copyright by scireum GmbH
* http://www.scireum.de - [email protected]
*/
package sirius.web.security;
import sirius.web.http.WebContext;
import javax.annotation.Nonnull;
/**
* Detects the current {@link sirius.web.security.ScopeInfo} for a given request.
*
* Used by {@link sirius.web.security.UserContext} to determine the scope, this request belongs to.
*
* @see sirius.web.security.ScopeInfo
*/
public interface ScopeDetector {
/**
* Detects the scope for the given request.
*
* @param request the request to detect the scope from
* @return the scope this request belongs to. Use {@link sirius.web.security.ScopeInfo#DEFAULT_SCOPE} if no
* specific scope can be detected.
*/
@Nonnull
ScopeInfo detectScope(@Nonnull WebContext request);
}