Skip to content

Commit

Permalink
Switch to string
Browse files Browse the repository at this point in the history
  • Loading branch information
olevitt committed Feb 8, 2024
1 parent 17bdfdb commit 4037e31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Configurable properties :
| `oidc.audience` | | Optional : audience to validate. Must be the same as the token's `aud` field |
| `oidc.username-claim` | `preferred_username` | Claim to be used as user id. Must conform to [RFC 1123](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names) |
| `oidc.groups-claim` | `groups` | Claim to be used as list of user groups. |
| `oidc.extra-query-params` | | Optional : map of query params to be used by client. e.g : `{ "prompt": "consent"}` |
| `oidc.extra-query-params` | | Optional : query params to be added by client. e.g : `prompt=consent&kc_idp_hint=google` |

### Security configuration :
| Key | Default | Description |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import fr.insee.onyxia.api.services.utils.HttpRequestUtils;
import fr.insee.onyxia.model.User;
import fr.insee.onyxia.model.region.Region;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
Expand Down Expand Up @@ -60,9 +58,10 @@ public class OIDCConfiguration {
@Value("${oidc.clientID}")
private String clientID;

private final HttpRequestUtils httpRequestUtils;
@Value("${oidc.extra-query-params}")
private String extraQueryParams;

private Map<String, String> extraQueryParams = new HashMap<>();
private final HttpRequestUtils httpRequestUtils;

@Autowired
public OIDCConfiguration(HttpRequestUtils httpRequestUtils) {
Expand Down Expand Up @@ -214,11 +213,11 @@ public void setClientID(String clientID) {
this.clientID = clientID;
}

public Map<String, String> getExtraQueryParams() {
public String getExtraQueryParams() {
return extraQueryParams;
}

public void setExtraQueryParams(Map<String, String> extraQueryParams) {
public void setExtraQueryParams(String extraQueryParams) {
this.extraQueryParams = extraQueryParams;
}

Expand Down

0 comments on commit 4037e31

Please sign in to comment.