currently to get the jwk keys from discovery URL(https://login.microsoftonline.com/tenentID/discovery/v2.0/keys). It creates default URLConnection and TLS.
How we can create customized TLS connection. My server is disabled TLSv1 and TLSv1.1.
class:
public class UrlJwkProvider implements JwkProvider {
method:
private Map<String, Object> getJwks() throws SigningKeyNotFoundException {
URLConnection connection = (URLConnection) url.openConnection();
Something similar like this.
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
SSLContext sc = SSLContext.getInstance("TLSv1.2");
sc.init(null, null, new java.security.SecureRandom());
currently to get the jwk keys from discovery URL(https://login.microsoftonline.com/tenentID/discovery/v2.0/keys). It creates default URLConnection and TLS.
How we can create customized TLS connection. My server is disabled TLSv1 and TLSv1.1.
class:
public class UrlJwkProvider implements JwkProvider {
method:
private Map<String, Object> getJwks() throws SigningKeyNotFoundException {
URLConnection connection = (URLConnection) url.openConnection();
Something similar like this.
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
SSLContext sc = SSLContext.getInstance("TLSv1.2");
sc.init(null, null, new java.security.SecureRandom());