Skip to content

Commit

Permalink
Switched allowAuthorization() to return true
Browse files Browse the repository at this point in the history
  • Loading branch information
ctyano committed Nov 13, 2023
1 parent 93406d8 commit 478a32e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.project
.settings
target
pom.xml
7 changes: 6 additions & 1 deletion pom.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<slf4j.version>1.7.36</slf4j.version>
<logback.version>1.2.11</logback.version>
<javax.version>3.1.0</javax.version>
<javax.ws.version>2.1.1</javax.ws.version>
<jakarta.servlet.version>5.0.0</jakarta.servlet.version>
<mockito.version>4.4.0</mockito.version>
<jmockit.version>1.49</jmockit.version>
<jjwt.version>0.11.2</jjwt.version>
Expand Down Expand Up @@ -100,6 +100,11 @@
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${javax.version}</version>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>${jakarta.servlet.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public String getAuthenticateChallenge() {

@Override
public boolean allowAuthorization() {
return false;
return true;
}

@Override
Expand Down Expand Up @@ -100,4 +100,4 @@ boolean checkIpAddressMatch(String remoteAddr) {
}
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void testGetAuthenticateChallenge() {
@Test
public void testAllowAuthorization() {
AuthHeaderAuthority aha = new AuthHeaderAuthority();
assertFalse(aha.allowAuthorization());
assertTrue(aha.allowAuthorization());
}

@Test
Expand Down Expand Up @@ -86,4 +86,4 @@ public void testGetSimplePrincipal() {
assertNotNull(sp);
assertEquals(sp.getAuthority().getClass(), AuthHeaderAuthority.class);
}
}
}

0 comments on commit 478a32e

Please sign in to comment.