Skip to content

Commit

Permalink
updated validate method and removed isValid property
Browse files Browse the repository at this point in the history
  • Loading branch information
sufyankhanrao committed Oct 4, 2023
1 parent e3eddb5 commit 7cdc607
Showing 1 changed file with 1 addition and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
*/
public abstract class Authentication {

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

/**
* Stores the error message for the auth scheme.
*/
Expand All @@ -26,24 +21,9 @@ 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 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;
}
public abstract boolean validate();

/**
* Returns the error message if the auth credentials are not valid.
Expand Down

0 comments on commit 7cdc607

Please sign in to comment.