Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use x509 Authentication endpoint URL when configured #77

Conversation

mpmadhavig
Copy link
Contributor

Purpose

$subject

Resolves wso2/product-is#17484

@mpmadhavig mpmadhavig changed the title Swap the URL hostnames Use x509 Authentication endpoint URL when configured Nov 21, 2023
Comment on lines 82 to 85
if (port == -1) {
commonAuthURL = protocol + "://" + host + "/" + X509CertificateConstants.COMMON_AUTH;
} else {
commonAuthURL = protocol + "://" + host + ":" + port + "/" + X509CertificateConstants.COMMON_AUTH;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIU the commonAuthURL will not contain the port number if the port is only -1. Can this port be a different minus value like -2, -3 etc. If so is it ok to add that to the URL?

Copy link
Contributor Author

@mpmadhavig mpmadhavig Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the documentation of java.net.URL getPort[1] method, Returns: the port number, or -1 if the port is not set.

[1] https://docs.oracle.com/javase/8/docs/api/java/net/URL.html#getPort--

@mpmadhavig mpmadhavig closed this Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants