Skip to content

Commit

Permalink
add unlink idp. bump kc versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
xgp committed Jun 18, 2024
1 parent a27609a commit 6c02b1e
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<keycloak.version>22.0.1</keycloak.version>
<keycloak.version>24.0.5</keycloak.version>
<jackson-version>2.15.2</jackson-version>
<junit-version>5.8.2</junit-version>
<joda-version>2.10.13</joda-version>
Expand Down Expand Up @@ -165,7 +165,7 @@
<dependency>
<groupId>com.github.dasniko</groupId>
<artifactId>testcontainers-keycloak</artifactId>
<version>2.5.0</version>
<version>3.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ public interface IdentityProvidersApi {
@Consumes({ "application/json" })
Response linkIdp(@PathParam("realm") String realm,@PathParam("orgId") String orgId,LinkIdentityProviderRepresentation linkIdentityProviderRepresentation);

@POST
@Path("/{alias}/unlink")
void unlinkIdp(@PathParam("realm") String realm,@PathParam("orgId") String orgId,@PathParam("alias") String alias);

@PUT
@Path("/{alias}")
@Consumes({ "application/json" })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,21 @@
import java.util.List;


@Path("/{realm}/orgs/{orgId}/invitations/{invitationId}")
@Path("/{realm}/orgs/{orgId}/invitations")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public interface OrganizationInvitationApi {

@GET
@Path("/{invitationId}")
@Produces({ "application/json" })
InvitationRepresentation getOrganizationInvitationById(@PathParam("realm") String realm,@PathParam("orgId") String orgId,@PathParam("invitationId") String invitationId);

@GET
@Path("/count")
@Produces({ "application/json" })
Integer getOrganizationInvitationCount(@PathParam("realm") String realm,@PathParam("orgId") String orgId);

@PUT
@Path("/resend-email")
@Path("/{invitationId}/resend-email")
void resendOrganizationInvitation(@PathParam("realm") String realm,@PathParam("orgId") String orgId,@PathParam("invitationId") String invitationId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ public String toString() {
sb.append(" inviterId: ").append(toIndentedString(inviterId)).append("\n");
sb.append(" organizationId: ").append(toIndentedString(organizationId)).append("\n");
sb.append(" roles: ").append(toIndentedString(roles)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
sb.append("}");
return sb.toString();
Expand Down
72 changes: 72 additions & 0 deletions src/main/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,41 @@ paths:
x-accepts: application/json
x-tags:
- tag: Organization Invitations
/{realm}/orgs/{orgId}/invitations/count:
get:
description: Get a count of invitations to an organization
operationId: getOrganizationInvitationCount
parameters:
- description: realm name (not id!)
explode: false
in: path
name: realm
required: true
schema:
type: string
style: simple
- description: organization id
explode: false
in: path
name: orgId
required: true
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
format: int32
type: integer
description: success
summary: Get organization invitation count
tags:
- Organization Invitation
x-accepts: application/json
x-tags:
- tag: Organization Invitation
/{realm}/orgs/{orgId}/invitations/{invitationId}:
delete:
operationId: removeOrganizationInvitation
Expand Down Expand Up @@ -1501,6 +1536,43 @@ paths:
x-accepts: application/json
x-tags:
- tag: Identity Providers
/{realm}/orgs/{orgId}/idps/${idpAlias}/unlink:
post:
operationId: unlinkIdp
parameters:
- description: realm name (not id!)
explode: false
in: path
name: realm
required: true
schema:
type: string
style: simple
- description: organization id
explode: false
in: path
name: orgId
required: true
schema:
type: string
style: simple
- description: idp alias
explode: false
in: path
name: idpAlias
required: true
schema:
type: string
style: simple
responses:
"204":
description: success
summary: Unlink an existing and linked identity provider from this organization
tags:
- Identity Providers
x-accepts: application/json
x-tags:
- tag: Identity Providers
/{realm}/orgs/{orgId}/idps/{alias}:
delete:
operationId: deleteIdp
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/phasetwo/client/PhaseTwoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
public class PhaseTwoTest {

public static final KeycloakContainer container =
new KeycloakContainer("quay.io/phasetwo/phasetwo-keycloak:21.1.2.1691497549").withContextPath("/auth").withReuse(true);
new KeycloakContainer("quay.io/phasetwo/phasetwo-keycloak:24.0.4").withContextPath("/auth").withReuse(true);

@BeforeAll
public static void beforeAll() {
Expand Down

0 comments on commit 6c02b1e

Please sign in to comment.