MCPcopy Index your code
hub / github.com/jgraph/drawio / getConfig

Method getConfig

src/main/java/com/mxgraph/online/MSGraphAuth.java:17–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15 private static Config CONFIG = null;
16
17 protected Config getConfig()
18 {
19 if (CONFIG == null)
20 {
21 String clientSecrets = SecretFacade.getSecret(CLIENT_SECRET_FILE_PATH, getServletContext());
22 String clientId = SecretFacade.getSecret(CLIENT_ID_FILE_PATH, getServletContext());
23 String tenantId = null;
24
25 try
26 {
27 tenantId = SecretFacade.getSecret(TENANT_ID_FILE_PATH, getServletContext());
28 } catch (Exception e) {}
29
30 CONFIG = new Config(clientId, clientSecrets);
31
32 String tenantIdPathPart = (tenantId != null && !tenantId.trim().isEmpty()) ? tenantId.trim() : "common";
33 CONFIG.AUTH_SERVICE_URL = "https://login.microsoftonline.com/" + tenantIdPathPart + "/oauth2/v2.0/token";
34
35 CONFIG.REDIRECT_PATH = "/microsoft";
36 }
37
38 return CONFIG;
39 }
40
41 public MSGraphAuth()
42 {

Callers

nothing calls this directly

Calls 2

getSecretMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected