-
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.
- Loading branch information
Showing
9 changed files
with
126 additions
and
80 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
14 changes: 14 additions & 0 deletions
14
foxogram-common/src/main/java/su/foxogram/dtos/response/MFAKeyDTO.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,14 @@ | ||
package su.foxogram.dtos.response; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
public class MFAKeyDTO { | ||
private String key; | ||
|
||
public MFAKeyDTO(String key) { | ||
this.key = key; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
foxogram-common/src/main/java/su/foxogram/exceptions/MFAIsAlreadySetException.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,13 @@ | ||
package su.foxogram.exceptions; | ||
|
||
import org.springframework.http.HttpStatus; | ||
import org.springframework.web.bind.annotation.ResponseStatus; | ||
import su.foxogram.constants.ExceptionsConstants; | ||
|
||
@ResponseStatus(HttpStatus.FORBIDDEN) | ||
public class MFAIsAlreadySetException extends BaseException { | ||
|
||
public MFAIsAlreadySetException() { | ||
super("MFA is already set.", MFAIsAlreadySetException.class.getAnnotation(ResponseStatus.class).value(), ExceptionsConstants.Codes.MFA_IS_ALREADY_SET.getValue()); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
foxogram-common/src/main/java/su/foxogram/exceptions/MFAIsNotSetException.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,13 @@ | ||
package su.foxogram.exceptions; | ||
|
||
import org.springframework.http.HttpStatus; | ||
import org.springframework.web.bind.annotation.ResponseStatus; | ||
import su.foxogram.constants.ExceptionsConstants; | ||
|
||
@ResponseStatus(HttpStatus.FORBIDDEN) | ||
public class MFAIsNotSetException extends BaseException { | ||
|
||
public MFAIsNotSetException() { | ||
super("MFA is not set.", MFAIsNotSetException.class.getAnnotation(ResponseStatus.class).value(), ExceptionsConstants.Codes.MFA_IS_NOT_SET.getValue()); | ||
} | ||
} |
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
31 changes: 0 additions & 31 deletions
31
foxogram-common/src/main/java/su/foxogram/interceptors/MFAInterceptor.java
This file was deleted.
Oops, something went wrong.
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