Skip to content

Commit

Permalink
Feil i parsing av planB properties (#1189)
Browse files Browse the repository at this point in the history
  • Loading branch information
jolarsen authored Sep 26, 2022
1 parent d1f4548 commit d105474
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public OpenIDToken exhangeAuthCode(String authorizationCode, String callback, St
"&code=" + authorizationCode +
"&redirect_uri=" + URLEncoder.encode(callback, UTF_8) +
"&grant_type=authorization_code" +
//"&code_verifier=" + "ThisIsntRandomButItNeedsToBe43CharactersLong" +
"&client_secret=" + clientSecret;
var request = lagRequest(data);
var response = GeneriskTokenKlient.hentToken(request, azureProxy);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ public String buildRedirectString() {
var clientId = providerConfig.clientId();
var redirectUrl = ServerInfo.instance().getCallbackUrl();

//TODO - sjekke ut PKCE
//&code_challenge=YTFjNj......
//&code_challenge_method=S256

// KCD? "?session=winssochain&authIndexType=service&authIndexValue=winssochain";
return providerConfig.authorizationEndpoint().toString() +
"&response_type=code" +
"&response_mode=query" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ public final class AzureConfigProperties {

private static final Environment ENV = Environment.current();

// En *-separert liste over scopes man ønsker inkludert i token - i starten brukes openid
// Fx api://<cluster>:<namespace>:fplos/default*api://<cluster>:<namespace>:fpsak/default
// NB: dersom denne settes - så vurder å begynne med openid*offline_access*api://....
// En mellomrom-separert liste over scopes man ønsker inkludert i token - i starten brukes openid
// NB: dersom denne settes - så begynn med openid offline_access api://....
// Fx openid offline_access api://<cluster>.<namespace>.fplos/.default api://<cluster>.<namespace>.fpsak/.default
private static final String AZURE_SCOPES_PROPERTY_NAME = "fp.trial.azure.scopes";

// Sett = true for å aktivere
Expand All @@ -19,8 +19,7 @@ public final class AzureConfigProperties {
private static final String OPENID_SCOPE = "openid offline_access";


private static final String AZURE_SCOPES = Optional.ofNullable(ENV.getProperty(AZURE_SCOPES_PROPERTY_NAME))
.map(s -> s.replace("\\*", " ")).orElse(OPENID_SCOPE);
private static final String AZURE_SCOPES = Optional.ofNullable(ENV.getProperty(AZURE_SCOPES_PROPERTY_NAME)).orElse(OPENID_SCOPE);
private static final boolean AZURE_ENABLED = Optional.ofNullable(ENV.getProperty(AZURE_TRIAL_ENABLED)).filter("true"::equals).isPresent();

private AzureConfigProperties() {
Expand Down

0 comments on commit d105474

Please sign in to comment.