-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Password settings and other minor fixes (#95)
* Get and set password settings for project and tenants * pom version
- Loading branch information
Showing
31 changed files
with
678 additions
and
39 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
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
25 changes: 25 additions & 0 deletions
25
src/main/java/com/descope/model/passwordsettings/PasswordSettings.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,25 @@ | ||
package com.descope.model.passwordsettings; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class PasswordSettings { | ||
private Boolean enabled; | ||
private Integer minLength; | ||
private Boolean lowercase; | ||
private Boolean uppercase; | ||
private Boolean number; | ||
private Boolean nonAlphanumeric; | ||
private Boolean expiration; | ||
private Integer expirationWeeks; | ||
private Boolean reuse; | ||
private Integer reuseAmount; | ||
private Boolean lock; | ||
private Integer lockAttempts; | ||
} |
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
26 changes: 26 additions & 0 deletions
26
src/main/java/com/descope/model/tenant/TenantSettings.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,26 @@ | ||
package com.descope.model.tenant; | ||
|
||
import com.fasterxml.jackson.annotation.JsonAlias; | ||
import java.util.List; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class TenantSettings { | ||
List<String> domains; | ||
List<String> selfProvisioningDomains; | ||
@JsonAlias({"enabled"}) | ||
Boolean sessionSettingsEnabled; | ||
Integer refreshTokenExpiration; | ||
String refreshTokenExpirationUnit; | ||
Integer sessionTokenExpiration; | ||
String sessionTokenExpirationUnit; | ||
Boolean enableInactivity; | ||
Integer inactivityTime; | ||
String inactivityTimeUnit; | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/com/descope/model/user/response/UserHistoryResponse.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,21 @@ | ||
package com.descope.model.user.response; | ||
|
||
import java.time.Instant; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class UserHistoryResponse { | ||
String userId; | ||
Integer loginTime; | ||
String city; | ||
String country; | ||
String ip; | ||
|
||
public Instant getLoginTimeInstant() { | ||
return Instant.ofEpochSecond(loginTime); | ||
} | ||
} |
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,11 +1,16 @@ | ||
package com.descope.proxy; | ||
|
||
import com.fasterxml.jackson.core.type.TypeReference; | ||
import java.net.URI; | ||
|
||
public interface ApiProxy { | ||
<R> R get(URI uri, Class<R> returnClz); | ||
|
||
<R> R getArray(URI uri, TypeReference<R> typeReference); | ||
|
||
<B, R> R post(URI uri, B body, Class<R> returnClz); | ||
|
||
<B, R> R postAndGetArray(URI uri, B body, TypeReference<R> typeReference); | ||
|
||
<B, R> R delete(URI uri, B body, Class<R> returnClz); | ||
} |
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
Oops, something went wrong.