Package org.silverpeas.core.webapi.base
Interface WebAuthorizationValidation
-
- All Known Subinterfaces:
ProtectedWebResource
,ScimProtectedWebResource
,WbeProtectedWebResource
- All Known Implementing Classes:
AbstractAdminResource
,AbstractAttachmentResource
,AbstractCalendarResource
,AbstractContributionResource
,AbstractLoggingResource
,AbstractLookResource
,AbstractMessageResource
,AbstractNodeResource
,AbstractPasswordResource
,AbstractPublicationResource
,AbstractSimpleDocumentResource
,AbstractSubscriptionResource
,AbstractWbeFileResource
,AttachmentResource
,AuthenticationResource
,BundleResource
,CalendarResource
,CipherKeyResource
,CmisUserAuthenticator
,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 WebAuthorizationValidation
Validation of the authorization of a user to access a web endpoint in Silverpeas. This interface requires to be implemented by all of authorization validators in Silverpeas. The validation of the authorization can be only performed against authenticated users.- Author:
- mmoquillon
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SilverpeasRequestContext
getSilverpeasContext()
Gets the context of Silverpeas linked to the current request.default void
validateUserAuthorization(UserPrivilegeValidation validation)
Validates the authorization of the user to request the web endpoint referred by the Silverpeas context by using the specified user privilege validation service.
-
-
-
Method Detail
-
getSilverpeasContext
SilverpeasRequestContext getSilverpeasContext()
Gets the context of Silverpeas linked to the current request. This context must be initialized before the functional request processing.- Returns:
SilverpeasRequestContext
instance.
-
validateUserAuthorization
default void validateUserAuthorization(UserPrivilegeValidation validation)
Validates the authorization of the user to request the web endpoint referred by the Silverpeas context by using the specified user privilege validation service. By default, it checks only the user has a valid account in Silverpeas. Further or more precise authorization treatments are delegated to implementors.This method should be invoked for web services requiring an authorized user to access them. Otherwise, the annotation
Authorized
can be also used instead at class level.- Parameters:
validation
- the validation instance to use.- Throws:
javax.ws.rs.WebApplicationException
- if the authorization isn't valid (no authorized or authorization failure).- See Also:
UserPrivilegeValidator
-
-