-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* SIDM-4092 WIP * SIDM-4092 WIP * SIDM-4092 WIP * SIDM-4092 WIP * SIDM-4092 Fix OTP max attempts issue. Remove local maven entry (for local dev). * SIDM-4092 Post-rebase code fixes. * SIDM-4092 Post-rebase code fixes. * SIDM-4092 Sonar fix.
- Loading branch information
Radoslaw Orlowski
authored
Jul 14, 2020
1 parent
7efc706
commit 2ccb748
Showing
10 changed files
with
493 additions
and
958 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
261 changes: 140 additions & 121 deletions
261
src/main/java/uk/gov/hmcts/reform/idam/web/AppController.java
Large diffs are not rendered by default.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
src/main/java/uk/gov/hmcts/reform/idam/web/strategic/ApiAuthResult.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 uk.gov.hmcts.reform.idam.web.strategic; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
import org.springframework.http.HttpStatus; | ||
import uk.gov.hmcts.reform.idam.api.internal.model.ErrorResponse; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@Builder | ||
public class ApiAuthResult { | ||
|
||
private List<String> cookies; | ||
private EvaluatePoliciesAction policiesAction; | ||
private HttpStatus httpStatus; | ||
private ErrorResponse.CodeEnum errorCode; | ||
|
||
public boolean isSuccess() { | ||
return (httpStatus == HttpStatus.OK || httpStatus == HttpStatus.FOUND) && | ||
errorCode == null && policiesAction != EvaluatePoliciesAction.BLOCK; | ||
} | ||
|
||
public boolean requiresMfa() { | ||
return policiesAction == EvaluatePoliciesAction.MFA_REQUIRED; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/uk/gov/hmcts/reform/idam/web/strategic/EvaluatePoliciesAction.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,7 @@ | ||
package uk.gov.hmcts.reform.idam.web.strategic; | ||
|
||
public enum EvaluatePoliciesAction { | ||
ALLOW, | ||
BLOCK, | ||
MFA_REQUIRED, | ||
} |
201 changes: 0 additions & 201 deletions
201
src/main/java/uk/gov/hmcts/reform/idam/web/strategic/PolicyService.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.