Package de.xima.fc.security.helper
Class SecurityWebEndpointHelper
java.lang.Object
de.xima.fc.security.helper.SecurityWebEndpointHelper
Helper for working with
IWebEndpoints.- Since:
- 8.0.0
- Author:
- XIMA Media GmbH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final Stringstatic IViewstatic Stringstatic StringgetLoginUri(IUser user) Returns the default login URI for the given user.static StringgetLoginUri(IWebEndpoint endpoint) Returns the default login URI for the given web endpoint.static StringgetScopeIdentitfier(Mandant client) static final StringgetViewUriWithContext(javax.servlet.http.HttpServletRequest request, IView view) static booleanisPublic(IWebEndpoint endpoint) Checks if the given endpoint is public.static booleanisUserAuthorized(IWebEndpoint endpoint, IAuthorizationContext context, IUser user) Checks if the given user has authorization for the given web endpoint within the given context.static booleanisWebEndpointAvailable(IWebEndpoint endpoint, IAvailabilityContext context) Checks if the given web endpoint is available within the given context.static final StringnotFound()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:
trueif the given web endpoint is available in the given context andfalseotherwise.
-
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:
trueif the given user has authorization to the given web endpoint within the context andfalseotherwise.
-
isPublic
Checks if the given endpoint is public.- Parameters:
endpoint- to check.- Returns:
trueif the given web endpoint is a public web endpoint andfalseotherwise.
-