-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* new SSO logic and SSO apps * fix typo
- Loading branch information
Showing
52 changed files
with
1,294 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/main/java/com/descope/model/magiclink/SignUpOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.descope.model.magiclink; | ||
|
||
import java.util.Map; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class SignUpOptions { | ||
private Map<String, Object> customClaims; | ||
private Map<String, String> templateOptions; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.descope.model.mgmt; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class IDResponse { | ||
private String id; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,26 @@ | ||
package com.descope.model.sso; | ||
|
||
import java.util.Map; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
/** | ||
* Represents a SAML mapping between Descope and IDP user attributes. | ||
*/ | ||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class AttributeMapping { | ||
private String name; | ||
private String givenName; | ||
private String middleName; | ||
private String familyName; | ||
private String picture; | ||
private String email; | ||
private String phoneNumber; | ||
private String group; | ||
private Map<String, String> customAttributes; | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/com/descope/model/sso/OIDCAttributeMapping.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.descope.model.sso; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
/** | ||
* Represents a OIDC mapping between Descope and IDP user attributes. | ||
*/ | ||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class OIDCAttributeMapping { | ||
private String loginId; | ||
private String name; | ||
private String givenName; | ||
private String middleName; | ||
private String familyName; | ||
private String email; | ||
private String verifiedEmail; | ||
private String username; | ||
private String phoneNumber; | ||
private String verifiedPhone; | ||
private String picture; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.descope.model.sso; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.util.List; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class SSOOIDCSettings { | ||
private String name; | ||
private String clientId; | ||
private String clientSecret; | ||
private String redirectUrl; | ||
private String authUrl; | ||
private String tokenUrl; | ||
private String userDataUrl; | ||
private List<String> scope; | ||
@JsonProperty("JWKsUrl") | ||
private String jwksUrl; | ||
private OIDCAttributeMapping userAttrMapping; | ||
private Boolean manageProviderTokens; | ||
private String callbackDomain; | ||
private List<String> prompt; | ||
private String grantType; | ||
private String issuer; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.descope.model.sso; | ||
|
||
import java.util.List; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class SSOSAMLSettings { | ||
private String idpUrl; | ||
private String entityId; | ||
private String idpCert; | ||
private AttributeMapping attributeMapping; | ||
private List<RoleMapping> roleMappings; | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/com/descope/model/sso/SSOSAMLSettingsByMetadata.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.descope.model.sso; | ||
|
||
import java.util.List; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class SSOSAMLSettingsByMetadata { | ||
private String idpMetadataUrl; | ||
private AttributeMapping attributeMapping; | ||
private List<RoleMapping> roleMappings; | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/com/descope/model/sso/SSOSAMLSettingsResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.descope.model.sso; | ||
|
||
import java.util.List; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class SSOSAMLSettingsResponse { | ||
private String idpEntityId; | ||
private String idpSSOUrl; | ||
private String idpCertificate; | ||
private String idpMetadataUrl; | ||
private String spEntityId; | ||
private String spACSUrl; | ||
private String spCertificate; | ||
private AttributeMapping attributeMapping; | ||
private List<GroupsMapping> groupsMapping; | ||
private String redirectUrl; | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/com/descope/model/sso/SSOTenantSettingsResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.descope.model.sso; | ||
|
||
import com.descope.model.tenant.Tenant; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class SSOTenantSettingsResponse { | ||
private Tenant tenant; | ||
private SSOSAMLSettingsResponse saml; | ||
private SSOOIDCSettings oidc; | ||
} |
37 changes: 37 additions & 0 deletions
37
src/main/java/com/descope/model/ssoapp/OIDCApplicationRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.descope.model.ssoapp; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class OIDCApplicationRequest { | ||
/** | ||
* Optional ID that if given must be unique per project. Will be generated if not given. | ||
*/ | ||
private String id; | ||
/** | ||
* The sso application's name. Must be unique per project. | ||
*/ | ||
private String name; | ||
/** | ||
* Optional sso application description. | ||
*/ | ||
private String description; | ||
/** | ||
* Optional set the sso application as enabled or disabled. | ||
*/ | ||
private Boolean enabled; | ||
/** | ||
* Optional sso application logo. | ||
*/ | ||
private String logo; | ||
/** | ||
* The URL where login page is hosted. | ||
*/ | ||
private String loginPageUrl; | ||
} |
Oops, something went wrong.