Skip to content

Commit 0ca65f8

Browse files
committed
Add Missing JavaDoc
Issue gh-6019
1 parent 5f1eb39 commit 0ca65f8

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/servlet/filter/Saml2WebSsoAuthenticationRequestFilter.java

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,29 +46,67 @@
4646
import static org.springframework.util.StringUtils.hasText;
4747

4848
/**
49+
* This {@code Filter} formulates a
50+
* <a href="https://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf">SAML 2.0 AuthnRequest</a> (line 1968)
51+
* and redirects to a configured asserting party.
52+
*
53+
* <p>
54+
* It supports the
55+
* <a href="https://docs.oasis-open.org/security/saml/v2.0/saml-bindings-2.0-os.pdf">HTTP-Redirect</a> (line 520)
56+
* and
57+
* <a href="https://docs.oasis-open.org/security/saml/v2.0/saml-bindings-2.0-os.pdf">HTTP-POST</a> (line 753)
58+
* bindings.
59+
*
60+
* <p>
61+
* By default, this {@code Filter} responds to authentication requests
62+
* at the {@code URI} {@code /oauth2/authorization/{registrationId}}.
63+
* The {@code URI} template variable {@code {registrationId}} represents the
64+
* {@link RelyingPartyRegistration#getRegistrationId() registration identifier} of the relying party
65+
* that is used for initiating the authentication request.
66+
*
4967
* @since 5.2
68+
* @author Filip Hanik
69+
* @author Josh Cummings
5070
*/
5171
public class Saml2WebSsoAuthenticationRequestFilter extends OncePerRequestFilter {
5272

5373
private final RelyingPartyRegistrationRepository relyingPartyRegistrationRepository;
5474
private RequestMatcher redirectMatcher = new AntPathRequestMatcher("/saml2/authenticate/{registrationId}");
5575
private Saml2AuthenticationRequestFactory authenticationRequestFactory = new OpenSamlAuthenticationRequestFactory();
5676

77+
/**
78+
* Construct a {@link Saml2WebSsoAuthenticationRequestFilter} with the provided parameters
79+
*
80+
* @param relyingPartyRegistrationRepository a repository for relying party configurations
81+
*/
5782
public Saml2WebSsoAuthenticationRequestFilter(RelyingPartyRegistrationRepository relyingPartyRegistrationRepository) {
5883
Assert.notNull(relyingPartyRegistrationRepository, "relyingPartyRegistrationRepository cannot be null");
5984
this.relyingPartyRegistrationRepository = relyingPartyRegistrationRepository;
6085
}
6186

87+
/**
88+
* Use the given {@link Saml2AuthenticationRequestFactory} for formulating the SAML 2.0 AuthnRequest
89+
*
90+
* @param authenticationRequestFactory the {@link Saml2AuthenticationRequestFactory} to use
91+
*/
6292
public void setAuthenticationRequestFactory(Saml2AuthenticationRequestFactory authenticationRequestFactory) {
6393
Assert.notNull(authenticationRequestFactory, "authenticationRequestFactory cannot be null");
6494
this.authenticationRequestFactory = authenticationRequestFactory;
6595
}
6696

97+
/**
98+
* Use the given {@link RequestMatcher} that activates this filter for a given request
99+
*
100+
* @param redirectMatcher the {@link RequestMatcher} to use
101+
*/
67102
public void setRedirectMatcher(RequestMatcher redirectMatcher) {
68103
Assert.notNull(redirectMatcher, "redirectMatcher cannot be null");
69104
this.redirectMatcher = redirectMatcher;
70105
}
71106

107+
/**
108+
* {@inheritDoc}
109+
*/
72110
@Override
73111
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
74112
throws ServletException, IOException {

0 commit comments

Comments
 (0)