@@ -0,0 +1,2483 @@
+/*%0A * Copyright (C) 2019 the original author or authors.%0A *%0A * This file is part of jBB Application Project.%0A *%0A *  Licensed under the Apache License, Version 2.0 (the %22License%22);%0A *  You may obtain a copy of the License at%0A *        http://www.apache.org/licenses/LICENSE-2.0%0A */%0A%0Apackage org.jbb.security.rest.signin;%0A%0Aimport org.jbb.lib.commons.security.UserDetailsSource;%0Aimport org.jbb.lib.eventbus.JbbEvent;%0Aimport org.jbb.lib.restful.domain.ErrorInfoCodes;%0Aimport org.jbb.lib.restful.sse.BaseStreamResource;%0Aimport org.jbb.security.event.SignInSettingsChangedEvent;%0Aimport org.springframework.http.MediaType;%0Aimport org.springframework.security.access.prepost.PreAuthorize;%0Aimport org.springframework.web.bind.annotation.GetMapping;%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0Aimport org.springframework.web.bind.annotation.RequestParam;%0Aimport org.springframework.web.bind.annotation.RestController;%0Aimport org.springframework.web.servlet.mvc.method.annotation.SseEmitter;%0A%0Aimport javax.servlet.http.HttpServletResponse;%0A%0Aimport io.swagger.annotations.Api;%0Aimport io.swagger.annotations.ApiOperation;%0A%0Aimport static org.jbb.lib.restful.RestConstants.API_V1;%0Aimport static org.jbb.lib.restful.RestConstants.SSE_STREAM;%0Aimport static org.jbb.security.rest.SecurityRestAuthorize.PERMIT_ALL_OR_OAUTH_SIGN_IN_SETTINGS_READ_SCOPE;%0Aimport static org.jbb.security.rest.SecurityRestConstants.SIGN_IN_SETTINGS;%0A%0A@RestController%0A@Api(tags = API_V1 + SIGN_IN_SETTINGS)%0A@RequestMapping(value = API_V1 + SIGN_IN_SETTINGS + SSE_STREAM, produces = MediaType.TEXT_EVENT_STREAM_VALUE)%0Apublic class SignInSettingsStreamResource extends BaseStreamResource %7B%0A%0A    public SignInSettingsStreamResource(UserDetailsSource userDetailsSource) %7B%0A        super(userDetailsSource);%0A    %7D%0A%0A    @Override%0A    protected AffectedMembers affectedMembers(JbbEvent jbbEvent) %7B%0A        if (jbbEvent instanceof SignInSettingsChangedEvent) %7B%0A            return AffectedMembers.allAuthorizedToEndpointMembers();%0A        %7D%0A        return AffectedMembers.noneMember();%0A    %7D%0A%0A    @GetMapping%0A    @ErrorInfoCodes(%7B%7D)%0A    @ApiOperation(%22Gets SSE stream with events related to sign in settings updates%22)%0A    @PreAuthorize(PERMIT_ALL_OR_OAUTH_SIGN_IN_SETTINGS_READ_SCOPE)%0A    public SseEmitter getEventStream(@RequestParam(name = %22timeout%22, defaultValue = %2230000%22) Long timeout,%0A                                     HttpServletResponse response) %7B%0A        return super.getEventStream(timeout);%0A    %7D%0A%0A%7D%0A

Add SignInSettingsStreamResource