Skip to content

Commit 32ce21b

Browse files
committed
automated code formatting and cleanup
1 parent b6cf8fe commit 32ce21b

248 files changed

Lines changed: 4079 additions & 4198 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

openid-connect-client/src/main/java/org/mitre/oauth2/introspectingfilter/IntrospectingTokenService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
*******************************************************************************/
1717
package org.mitre.oauth2.introspectingfilter;
1818

19+
import static org.mitre.oauth2.model.ClientDetailsEntity.AuthMethod.SECRET_BASIC;
20+
1921
import java.io.IOException;
2022
import java.net.URI;
2123
import java.util.Calendar;
@@ -54,8 +56,6 @@
5456
import com.google.gson.JsonParser;
5557
import com.nimbusds.jose.util.Base64;
5658

57-
import static org.mitre.oauth2.model.ClientDetailsEntity.AuthMethod.SECRET_BASIC;
58-
5959
/**
6060
* This ResourceServerTokenServices implementation introspects incoming tokens at a
6161
* server's introspection endpoint URL and passes an Authentication object along

openid-connect-client/src/main/java/org/mitre/oauth2/introspectingfilter/service/IntrospectionAuthorityGranter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*******************************************************************************/
1717
/**
18-
*
18+
*
1919
*/
2020
package org.mitre.oauth2.introspectingfilter.service;
2121

openid-connect-client/src/main/java/org/mitre/oauth2/introspectingfilter/service/IntrospectionConfigurationService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*******************************************************************************/
1717
/**
18-
*
18+
*
1919
*/
2020
package org.mitre.oauth2.introspectingfilter.service;
2121

openid-connect-client/src/main/java/org/mitre/oauth2/introspectingfilter/service/impl/JWTParsingIntrospectionConfigurationService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*******************************************************************************/
1717
/**
18-
*
18+
*
1919
*/
2020
package org.mitre.oauth2.introspectingfilter.service.impl;
2121

@@ -32,11 +32,11 @@
3232
import com.nimbusds.jwt.JWTParser;
3333

3434
/**
35-
*
35+
*
3636
* Parses the incoming accesstoken as a JWT and determines the issuer based on
3737
* the "iss" field inside the JWT. Uses the ServerConfigurationService to determine
3838
* the introspection URL for that issuer.
39-
*
39+
*
4040
* @author jricher
4141
*
4242
*/

openid-connect-client/src/main/java/org/mitre/oauth2/introspectingfilter/service/impl/ScopeBasedIntrospectionAuthoritiesGranter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*
3535
*/
3636
public class ScopeBasedIntrospectionAuthoritiesGranter implements IntrospectionAuthorityGranter {
37-
37+
3838
private List<GrantedAuthority> authorities = AuthorityUtils.createAuthorityList("ROLE_API");
3939

4040
/* (non-Javadoc)
@@ -43,15 +43,15 @@ public class ScopeBasedIntrospectionAuthoritiesGranter implements IntrospectionA
4343
@Override
4444
public List<GrantedAuthority> getAuthorities(JsonObject introspectionResponse) {
4545
List<GrantedAuthority> auth = new ArrayList<>(getAuthorities());
46-
46+
4747
if (introspectionResponse.has("scope") && introspectionResponse.get("scope").isJsonPrimitive()) {
4848
String scopeString = introspectionResponse.get("scope").getAsString();
4949
Set<String> scopes = OAuth2Utils.parseParameterList(scopeString);
5050
for (String scope : scopes) {
5151
auth.add(new SimpleGrantedAuthority("OAUTH_SCOPE_" + scope));
5252
}
5353
}
54-
54+
5555
return auth;
5656
}
5757

openid-connect-client/src/main/java/org/mitre/oauth2/introspectingfilter/service/impl/SimpleIntrospectionAuthorityGranter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*******************************************************************************/
1717
/**
18-
*
18+
*
1919
*/
2020
package org.mitre.oauth2.introspectingfilter.service.impl;
2121

@@ -28,9 +28,9 @@
2828
import com.google.gson.JsonObject;
2929

3030
/**
31-
*
31+
*
3232
* Grants the same set of authorities no matter what's passed in.
33-
*
33+
*
3434
* @author jricher
3535
*
3636
*/

openid-connect-client/src/main/java/org/mitre/oauth2/introspectingfilter/service/impl/StaticIntrospectionConfigurationService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@
1515
* limitations under the License.
1616
*******************************************************************************/
1717
/**
18-
*
18+
*
1919
*/
2020
package org.mitre.oauth2.introspectingfilter.service.impl;
2121

2222
import org.mitre.oauth2.introspectingfilter.service.IntrospectionConfigurationService;
2323
import org.mitre.oauth2.model.RegisteredClient;
2424

2525
/**
26-
*
26+
*
2727
* Always provides the (configured) IntrospectionURL and RegisteredClient regardless
2828
* of token. Useful for talking to a single, trusted authorization server.
29-
*
29+
*
3030
* @author jricher
3131
*
3232
*/

openid-connect-client/src/main/java/org/mitre/openid/connect/client/AuthorizationEndpointException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ public class AuthorizationEndpointException extends AuthenticationServiceExcepti
77
private static final long serialVersionUID = 6953119789654778380L;
88

99
private String error;
10-
10+
1111
private String errorDescription;
12-
12+
1313
private String errorURI;
1414

1515
public AuthorizationEndpointException(String error, String errorDescription, String errorURI) {

openid-connect-client/src/main/java/org/mitre/openid/connect/client/NamedAdminAuthoritiesMapper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*******************************************************************************/
1717
/**
18-
*
18+
*
1919
*/
2020
package org.mitre.openid.connect.client;
2121

@@ -34,13 +34,13 @@
3434
import com.nimbusds.jwt.JWTClaimsSet;
3535

3636
/**
37-
*
37+
*
3838
* Simple mapper that adds ROLE_USER to the authorities map for all queries,
3939
* plus adds ROLE_ADMIN if the subject and issuer pair are found in the
4040
* configurable "admins" set.
41-
*
41+
*
4242
* @author jricher
43-
*
43+
*
4444
*/
4545
public class NamedAdminAuthoritiesMapper implements OIDCAuthoritiesMapper {
4646

openid-connect-client/src/main/java/org/mitre/openid/connect/client/OIDCAuthenticationFilter.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@
8888

8989
/**
9090
* OpenID Connect Authentication Filter class
91-
*
91+
*
9292
* @author nemonik, jricher
93-
*
93+
*
9494
*/
9595
public class OIDCAuthenticationFilter extends AbstractAuthenticationProcessingFilter {
9696

@@ -169,9 +169,9 @@ public void afterPropertiesSet() {
169169

170170
/*
171171
* This is the main entry point for the filter.
172-
*
172+
*
173173
* (non-Javadoc)
174-
*
174+
*
175175
* @see org.springframework.security.web.authentication.
176176
* AbstractAuthenticationProcessingFilter
177177
* #attemptAuthentication(javax.servlet.http.HttpServletRequest,
@@ -204,7 +204,7 @@ public Authentication attemptAuthentication(HttpServletRequest request, HttpServ
204204

205205
/**
206206
* Initiate an Authorization request
207-
*
207+
*
208208
* @param request
209209
* The request from which to extract parameters and perform the
210210
* authentication
@@ -270,7 +270,7 @@ protected void handleAuthorizationRequest(HttpServletRequest request, HttpServle
270270
String state = createState(session);
271271

272272
Map<String, String> options = authOptions.getOptions(serverConfig, clientConfig, request);
273-
273+
274274
// if we're using PKCE, handle the challenge here
275275
if (clientConfig.getCodeChallengeMethod() != null) {
276276
String codeVerifier = createCodeVerifier(session);
@@ -287,7 +287,7 @@ protected void handleAuthorizationRequest(HttpServletRequest request, HttpServle
287287
e.printStackTrace();
288288
}
289289

290-
290+
291291
}
292292
}
293293

@@ -330,7 +330,7 @@ protected Authentication handleAuthorizationCodeResponse(HttpServletRequest requ
330330
form.add("grant_type", "authorization_code");
331331
form.add("code", authorizationCode);
332332
form.setAll(authOptions.getTokenOptions(serverConfig, clientConfig, request));
333-
333+
334334
String codeVerifier = getStoredCodeVerifier(session);
335335
if (codeVerifier != null) {
336336
form.add("code_verifier", codeVerifier);
@@ -345,11 +345,11 @@ protected Authentication handleAuthorizationCodeResponse(HttpServletRequest requ
345345

346346
if(httpClient == null) {
347347
httpClient = HttpClientBuilder.create()
348-
.useSystemProperties()
349-
.setDefaultRequestConfig(RequestConfig.custom()
350-
.setSocketTimeout(httpSocketTimeout)
351-
.build())
352-
.build();
348+
.useSystemProperties()
349+
.setDefaultRequestConfig(RequestConfig.custom()
350+
.setSocketTimeout(httpSocketTimeout)
351+
.build())
352+
.build();
353353
}
354354

355355
HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory(httpClient);
@@ -634,7 +634,7 @@ protected ClientHttpRequest createRequest(URI url, HttpMethod method) throws IOE
634634

635635
/**
636636
* Handle Authorization Endpoint error
637-
*
637+
*
638638
* @param request
639639
* The request from which to extract parameters and handle the
640640
* error
@@ -708,7 +708,7 @@ protected static String createState(HttpSession session) {
708708
protected static String getStoredState(HttpSession session) {
709709
return getStoredSessionString(session, STATE_SESSION_VARIABLE);
710710
}
711-
711+
712712
/**
713713
* Create a random code challenge and store it in the session
714714
* @param session
@@ -719,7 +719,7 @@ protected static String createCodeVerifier(HttpSession session) {
719719
session.setAttribute(CODE_VERIFIER_SESSION_VARIABLE, challenge);
720720
return challenge;
721721
}
722-
722+
723723
/**
724724
* Retrieve the stored challenge from our session
725725
* @param session

0 commit comments

Comments
 (0)