Skip to content

Commit

Permalink
reverted code to avoid major version change
Browse files Browse the repository at this point in the history
  • Loading branch information
sufyankhanrao committed Oct 12, 2023
1 parent 7cdc607 commit c98e8f3
Showing 1 changed file with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
*/
public abstract class Authentication {

/**
* Stores the validity of the auth scheme.
*/
private boolean isValid;

/**
* Stores the error message for the auth scheme.
*/
Expand All @@ -21,13 +26,28 @@ public abstract class Authentication {

/**
* Validates the credentials for authentication.
*/
public abstract void validate();

/**
* Checks if the auth credentials are valid.
* @return true if the auth credentials are valid, false otherwise.
*/
public abstract boolean validate();
public boolean isValid() {
return isValid;
}

/**
* Sets the validatity of the auth credentials.
* @param isValid the flag to set for validity.
*/
public void setValidity(boolean isValid) {
this.isValid = isValid;
}

/**
* Returns the error message if the auth credentials are not valid.
* @return The string message whenever the auth credentials are not valid.
* @return the string message whenever the auth credentials are not valid.
*/
public String getErrorMessage() {
return errorMessage;
Expand Down

0 comments on commit c98e8f3

Please sign in to comment.