Package org.silverpeas.core.webapi.base
Interface ProtectedWebResource
-
- All Superinterfaces:
SilverpeasWebResource
,WebAuthenticationValidation
,WebAuthorizationValidation
- All Known Subinterfaces:
ScimProtectedWebResource
,WbeProtectedWebResource
- All Known Implementing Classes:
AbstractAdminResource
,AbstractAttachmentResource
,AbstractCalendarResource
,AbstractContributionResource
,AbstractLoggingResource
,AbstractLookResource
,AbstractMessageResource
,AbstractNodeResource
,AbstractPasswordResource
,AbstractPublicationResource
,AbstractSimpleDocumentResource
,AbstractSubscriptionResource
,AbstractWbeFileResource
,AttachmentResource
,AuthenticationResource
,BundleResource
,CalendarResource
,CipherKeyResource
,CommentResource
,ComponentResource
,ComponentsResource
,ContributionContentResource
,DisplayResource
,DocumentViewResource
,EmbedMediaPlayerResource
,EmbedMediaViewerResource
,FileUploadResource
,FilteredPdcResource
,ICalendarResource
,InboxUserNotificationResource
,InvitationResource
,LanguageResource
,ListNodeResource
,LogResource
,MessageResource
,MyLinksResource
,MyPreferencesResource
,NodeResource
,PasswordResource
,PdcClassificationResource
,PdcPredefinedClassificationResource
,PdcResource
,PreviewResource
,PublicationResource
,RatingResource
,RelationResource
,ReminderResource
,ReplacementResource
,RESTWebService
,ScimV2BulkResource
,ScimV2GroupResource
,ScimV2ResourceTypeResource
,ScimV2SchemaResource
,ScimV2SearchResource
,ScimV2SelfResource
,ScimV2ServiceProviderConfigResource
,ScimV2UserResource
,SearchResource
,SharedAttachmentResource
,SharedNodeResource
,SharedPublicationResource
,SharingResource
,SilverLoggerConfigurationResource
,SimpleDocumentListResource
,SimpleDocumentResource
,SimpleDocumentResourceCreator
,SpaceResource
,SubscribeResource
,SubscriptionResource
,ThesaurusResource
,ThumbnailResource
,TicketResource
,UnsubscribeResource
,UserCalendarResource
,UserGroupProfileResource
,UserICalendarResource
,UserProfileResource
,VariablesResource
,VolatileCacheResource
,WysiwygEditorConfigResource
public interface ProtectedWebResource extends SilverpeasWebResource, WebAuthenticationValidation, WebAuthorizationValidation
A protected Web resource is a Web resource in Silverpeas that can require the user to be authenticated or authorized to access the instances of the resource. To be authorized the user requires to be authenticated. The web resource validates itself the user accessing it is well authenticated and, optionally, if he's authorized to handle it.- Author:
- mmoquillon
-
-
Field Summary
-
Fields inherited from interface org.silverpeas.core.web.SilverpeasWebResource
BASE_PATH
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
validateUserAuthorization(UserPrivilegeValidation validation)
Validates the authorization of the user to request this web service.-
Methods inherited from interface org.silverpeas.core.web.SilverpeasWebResource
getComponentId, getHttpRequest, getUri
-
Methods inherited from interface org.silverpeas.core.webapi.base.WebAuthenticationValidation
getSilverpeasContext, validateUserAuthentication
-
Methods inherited from interface org.silverpeas.core.webapi.base.WebAuthorizationValidation
getSilverpeasContext
-
-
-
-
Method Detail
-
validateUserAuthorization
default void validateUserAuthorization(UserPrivilegeValidation validation)
Validates the authorization of the user to request this web service. For doing, the user must have the rights to access the component instance that manages this web resource. If no such component instance exists, a Not Found HTTP error is thrown (status code 404). Otherwise the validation is delegated to the validation service by passing it the required information.This method should be invoked for web service requiring an authorized access. For doing, the authentication of the user must be first valdiated. Otherwise, the annotation Authorized can be also used instead at class level for both authentication and authorization.
- Specified by:
validateUserAuthorization
in interfaceWebAuthorizationValidation
- Parameters:
validation
- the validation instance to use.- Throws:
javax.ws.rs.WebApplicationException
- if the rights of the user are not enough to access this web resource.- See Also:
UserPrivilegeValidator
-
-