Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.auth0.json.mgmt.selfserviceprofiles;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class GoogleWorkspaceProvisioningConfig {
@JsonProperty("sync_users")
private boolean syncUsers;

@JsonProperty("sync_users")
public boolean isSyncUsers() {
return syncUsers;
}

@JsonProperty("sync_users")
public void setSyncUsers(boolean syncUsers) {
this.syncUsers = syncUsers;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public class ProvisioningConfig {
private List<String> scopes;
@JsonProperty("token_lifetime")
private int tokenLifetime;
@JsonProperty("google_workspace")
private GoogleWorkspaceProvisioningConfig googleWorkspace;


/**
Expand All @@ -33,6 +35,15 @@ public void setScopes(List<String> scopes) {
this.scopes = scopes;
}

/**
* Getter for the Google Workspace provisioning config.
* @return the Google Workspace provisioning config.
*/
@JsonProperty("google_workspace")
public GoogleWorkspaceProvisioningConfig getGoogleWorkspace() {
return googleWorkspace;
}

/**
* Getter for the token lifetime.
* @return the token lifetime.
Expand All @@ -50,4 +61,13 @@ public int getTokenLifetime() {
public void setTokenLifetime(int tokenLifetime) {
this.tokenLifetime = tokenLifetime;
}

/**
* Setter for the Google Workspace provisioning config.
* @param googleWorkspace the Google Workspace provisioning config to set.
*/
@JsonProperty("google_workspace")
public void setGoogleWorkspace(GoogleWorkspaceProvisioningConfig googleWorkspace) {
this.googleWorkspace = googleWorkspace;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@ public void shouldThrowOnCreateSsoAccessTicketWhenPayloadIsNull() {
public void shouldCreateSsoAccessTicket() throws Exception{
SsoAccessTicketRequest requestBody = new SsoAccessTicketRequest();
requestBody.setConnectionId("test-connection");
ProvisioningConfig provisioningConfig = new ProvisioningConfig();
GoogleWorkspaceProvisioningConfig googleWorkspace = new GoogleWorkspaceProvisioningConfig();
googleWorkspace.setSyncUsers(true);
provisioningConfig.setGoogleWorkspace(googleWorkspace);
requestBody.setProvisioningConfig(provisioningConfig);

Request<SsoAccessTicketResponse> request = api.selfServiceProfiles().createSsoAccessTicket("id", requestBody);
assertThat(request, is(notNullValue()));
Expand Down
Loading