Package de.xima.fc.security.helper
Class SecurityWebEndpointHelper
java.lang.Object
de.xima.fc.security.helper.SecurityWebEndpointHelper
Helper for working with
IWebEndpoint
s.- Since:
- 8.0.0
- Author:
- XIMA Media GmbH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final String
static IView
static String
static String
getLoginUri
(IUser user) Returns the default login URI for the given user.static String
getLoginUri
(IWebEndpoint endpoint) Returns the default login URI for the given web endpoint.static String
getScopeIdentitfier
(Mandant client) static final String
getViewUriWithContext
(javax.servlet.http.HttpServletRequest request, IView view) static boolean
isPublic
(IWebEndpoint endpoint) Checks if the given endpoint is public.static boolean
isUserAuthorized
(IWebEndpoint endpoint, IAuthorizationContext context, IUser user) Checks if the given user has authorization for the given web endpoint within the given context.static boolean
isWebEndpointAvailable
(IWebEndpoint endpoint, IAvailabilityContext context) Checks if the given web endpoint is available within the given context.static final String
notFound()
static final String
-
Constructor Details
-
SecurityWebEndpointHelper
public SecurityWebEndpointHelper()
-
-
Method Details
-
accessDenied
-
notFound
-
serverError
-
getViewUriWithContext
-
getLoginUri
Returns the default login URI for the given web endpoint. Different web endpoints can have different login URIs.- Parameters:
endpoint
- the web endpoint to get the login uri for.- Returns:
- the login URI for the given web endpoint.
-
getLoginUri
Returns the default login URI for the given user. The login URI depends on the authentication context of the user.- Parameters:
user
- to get the login uri for- Returns:
- the login uri for the given user.
-
getDefaultUriForAuthenticatedUser
-
getDefaultClientView
-
getScopeIdentitfier
-
isWebEndpointAvailable
Checks if the given web endpoint is available within the given context.- Parameters:
endpoint
- to check.context
- holds information about the context that is to be checked.- Returns:
true
if the given web endpoint is available in the given context andfalse
otherwise.
-
isUserAuthorized
public static boolean isUserAuthorized(IWebEndpoint endpoint, IAuthorizationContext context, IUser user) Checks if the given user has authorization for the given web endpoint within the given context.- Parameters:
endpoint
- to check.context
- holds information about the context that is to be checked (e.g. the current client)user
- to check.- Returns:
true
if the given user has authorization to the given web endpoint within the context andfalse
otherwise.
-
isPublic
Checks if the given endpoint is public.- Parameters:
endpoint
- to check.- Returns:
true
if the given web endpoint is a public web endpoint andfalse
otherwise.
-