Skip to content

Commit

Permalink
openIdConfig -> oidcConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
mraible committed Feb 14, 2023
1 parent 528df3c commit 8e7f158
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@
<configuration>
<commands>
<command>
/subsystem=undertow/application-security-domain=other:write-attribute(name=integrated-jaspi,
value=false)
/subsystem=undertow/application-security-domain=other:write-attribute(name=integrated-jaspi, value=false)
</command>
<command>reload</command>
</commands>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/demo/OidcConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.util.logging.Logger;

@ApplicationScoped
@Named("openIdConfig")
@Named("oidcConfig")
public class OidcConfig {
private static final Logger LOGGER = Logger.getLogger(OidcConfig.class.getName());

Expand All @@ -29,7 +29,7 @@ void init() {
clientSecret = properties.getProperty("clientSecret");
issuerUri = properties.getProperty("issuerUri");
} catch (IOException e) {
LOGGER.log(Level.SEVERE, "Failed to load openid.properties", e);
LOGGER.log(Level.SEVERE, "Failed to load oidc.properties", e);
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/demo/ProtectedServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
import jakarta.servlet.http.HttpServletResponse;

@OpenIdAuthenticationMechanismDefinition(
providerURI = "${openIdConfig.issuerUri}",
clientId = "${openIdConfig.clientId}",
clientSecret = "${openIdConfig.clientSecret}",
providerURI = "${oidcConfig.issuerUri}",
clientId = "${oidcConfig.clientId}",
clientSecret = "${oidcConfig.clientSecret}",
redirectURI = "${baseURL}/callback",
// default 500ms caused timeouts for me
jwksConnectTimeout = 5000,
jwksReadTimeout = 5000,
extraParameters = {"audience=https://${openIdConfig.issuerUri}/api/v2/"},
extraParameters = {"audience=https://${oidcConfig.issuerUri}/api/v2/"},
claimsDefinition = @ClaimsDefinition(callerGroupsClaim = "http://www.jakartaee.demo/roles")
)
@WebServlet("/protected")
Expand Down

0 comments on commit 8e7f158

Please sign in to comment.