blob: 851dc9cc89d91905d9ba9612bdfff7b669f1101a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package org.onap.ccsdk.sli.plugins.restapicall;
public enum AuthType {
NONE, BASIC, DIGEST, OAUTH, Unspecified;
public static AuthType fromString(String s) {
if ("basic".equalsIgnoreCase(s))
return BASIC;
if ("digest".equalsIgnoreCase(s))
return DIGEST;
if ("oauth".equalsIgnoreCase(s))
return OAUTH;
if ("none".equalsIgnoreCase(s))
return NONE;
if ("unspecified".equalsIgnoreCase(s))
return Unspecified;
throw new IllegalArgumentException("Invalid value for format: " + s);
}
}
|