Skip to content

Commit

Permalink
Merge pull request wildfly-security#1598 from pedro-hos/ELY-2164
Browse files Browse the repository at this point in the history
[ELY-2164] Add javadoc for org.wildfly.security.mechanism.ScramServer…
  • Loading branch information
Skyllarr committed Oct 14, 2021
2 parents 4c07f55 + f9b027a commit 4727318
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -23,6 +23,7 @@
import java.util.Locale;

/**
* This enum lists server error codes for SCRAM authentication mechanism.
* @author <a href="mailto:david.lloyd@redhat.com">David M. Lloyd</a>
*/
public enum ScramServerErrorCode {
Expand Down Expand Up @@ -65,6 +66,11 @@ byte[] getRawMessageBytes() {
return messageBytes;
}

/**
* Convert the error string to the respective {@code ScramServerErrorCode} enum value, or to the {@code OTHER_ERROR} value if can't match.
* @param value the error value as string
* @return the respective {@code ScramServerErrorCode} enum value from error string, {@code OTHER_ERROR} otherwise
*/
public static ScramServerErrorCode fromErrorString(String value) {
try {
return valueOf(value.replace('-', '_').toUpperCase(Locale.US));
Expand Down

0 comments on commit 4727318

Please sign in to comment.