ServerAPI/src/main/java/xyz/etztech/serverapi/token/TokenScope.java

25 lines
487 B
Java

package xyz.etztech.serverapi.token;
public enum TokenScope {
NONE,
GET,
POST,
ALL;
public static TokenScope parseScope(String scope) {
if (scope == null) {
return NONE;
}
switch (scope.toLowerCase()) {
case "get":
return GET;
case "post":
return POST;
case "all":
return ALL;
default:
return NONE;
}
}
}