Skip to content

Commit

Permalink
Merge pull request #20612 from asha15/hybridFLow
Browse files Browse the repository at this point in the history
Add hybrid flow response type to the OIDC configuration
  • Loading branch information
asha15 authored Jun 28, 2024
2 parents ebc42de + b97d4a7 commit ce2a4bc
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
package org.wso2.identity.integration.test.rest.api.server.application.management.v1.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;


import io.swagger.annotations.*;
import java.util.Objects;
import javax.validation.Valid;
import javax.xml.bind.annotation.*;

public class HybridFlowConfiguration {

private Boolean enable;
private String responseType;

/**
*
**/
public HybridFlowConfiguration enable(Boolean enable) {

this.enable = enable;
return this;
}

@ApiModelProperty(example = "true", value = "")
@JsonProperty("enable")
@Valid
public Boolean getEnable() {
return enable;
}

public void setEnable(Boolean enable) {
this.enable = enable;
}

/**
*
**/
public HybridFlowConfiguration responseType(String responseType) {

this.responseType = responseType;
return this;
}

@ApiModelProperty(example = "code id_token", value = "")
@JsonProperty("responseType")
@Valid
public String getResponseType() {
return responseType;
}

public void setResponseType(String responseType) {
this.responseType = responseType;
}


@Override
public boolean equals(java.lang.Object o) {

if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HybridFlowConfiguration hybridFlowConfiguration = (HybridFlowConfiguration) o;
return Objects.equals(this.enable, hybridFlowConfiguration.enable) &&
Objects.equals(this.responseType, hybridFlowConfiguration.responseType);
}

@Override
public int hashCode() {
return Objects.hash(enable, responseType);
}

@Override
public String toString() {

StringBuilder sb = new StringBuilder();
sb.append("class HybridFlowConfiguration {\n");

sb.append(" enable: ").append(toIndentedString(enable)).append("\n");
sb.append(" responseType: ").append(toIndentedString(responseType)).append("\n");
sb.append("}");
return sb.toString();
}

/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {

if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public static StateEnum fromValue(String value) {

private Boolean publicClient = false;
private OAuth2PKCEConfiguration pkce;
private HybridFlowConfiguration hybridFlow;
private AccessTokenConfiguration accessToken;
private RefreshTokenConfiguration refreshToken;
private SubjectTokenConfiguration subjectToken;
Expand Down Expand Up @@ -258,6 +259,24 @@ public void setPkce(OAuth2PKCEConfiguration pkce) {
this.pkce = pkce;
}

/**
**/
public OpenIDConnectConfiguration hybridFlow(HybridFlowConfiguration hybridFlow) {

this.hybridFlow = hybridFlow;
return this;
}

@ApiModelProperty(value = "")
@JsonProperty("hybridFlow")
@Valid
public HybridFlowConfiguration getHybridFlow() {
return hybridFlow;
}
public void setHybridFlow(HybridFlowConfiguration hybridFlow) {
this.hybridFlow = hybridFlow;
}

/**
**/
public OpenIDConnectConfiguration accessToken(AccessTokenConfiguration accessToken) {
Expand Down Expand Up @@ -519,6 +538,7 @@ public boolean equals(Object o) {
Objects.equals(this.allowedOrigins, openIDConnectConfiguration.allowedOrigins) &&
Objects.equals(this.publicClient, openIDConnectConfiguration.publicClient) &&
Objects.equals(this.pkce, openIDConnectConfiguration.pkce) &&
Objects.equals(this.hybridFlow, openIDConnectConfiguration.hybridFlow) &&
Objects.equals(this.accessToken, openIDConnectConfiguration.accessToken) &&
Objects.equals(this.refreshToken, openIDConnectConfiguration.refreshToken) &&
Objects.equals(this.subjectToken, openIDConnectConfiguration.subjectToken) &&
Expand All @@ -536,7 +556,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(clientId, clientSecret, state, grantTypes, callbackURLs, allowedOrigins, publicClient, pkce, accessToken, refreshToken, subjectToken, idToken, logout, validateRequestObjectSignature, scopeValidators, clientAuthentication, requestObject, pushAuthorizationRequest, subject, isFAPIApplication, fapiMetadata);
return Objects.hash(clientId, clientSecret, state, grantTypes, callbackURLs, allowedOrigins, publicClient, pkce, hybridFlow, accessToken, refreshToken, subjectToken, idToken, logout, validateRequestObjectSignature, scopeValidators, clientAuthentication, requestObject, pushAuthorizationRequest, subject, isFAPIApplication, fapiMetadata);
}

@Override
Expand All @@ -553,6 +573,7 @@ public String toString() {
sb.append(" allowedOrigins: ").append(toIndentedString(allowedOrigins)).append("\n");
sb.append(" publicClient: ").append(toIndentedString(publicClient)).append("\n");
sb.append(" pkce: ").append(toIndentedString(pkce)).append("\n");
sb.append(" hybridFlow: ").append(toIndentedString(hybridFlow)).append("\n");
sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n");
sb.append(" refreshToken: ").append(toIndentedString(refreshToken)).append("\n");
sb.append(" subjectToken: ").append(toIndentedString(subjectToken)).append("\n");
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2375,7 +2375,7 @@
<!-- Identity REST API feature -->
<identity.api.dispatcher.version>2.0.17</identity.api.dispatcher.version>
<identity.user.api.version>1.3.38</identity.user.api.version>
<identity.server.api.version>1.2.201</identity.server.api.version>
<identity.server.api.version>1.2.202</identity.server.api.version>

<identity.agent.sso.version>5.5.9</identity.agent.sso.version>
<identity.tool.samlsso.validator.version>5.5.8</identity.tool.samlsso.validator.version>
Expand Down

0 comments on commit ce2a4bc

Please sign in to comment.