Package org.silverpeas.web.test
Class AuthId
- java.lang.Object
-
- org.silverpeas.web.test.AuthId
-
public class AuthId extends Object
An authentication identification. Can be either the API token of a user or a pair of its login and password or a session key identifying its yet opened session. Both are ready encoded to be passed in the corresponding HTTP header, just callgetValue()
- Author:
- mmoquillon
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AuthId.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AuthId
apiToken(String token)
static AuthId
basicAuth(String login, String domainId, String password)
AuthId.Type
getType()
String
getValue()
boolean
isAuthentication()
boolean
isDefined()
boolean
isInSession()
static AuthId
sessionKey(String sessionKey)
-
-
-
Field Detail
-
NONE
public static final AuthId NONE
-
-
Method Detail
-
getType
public AuthId.Type getType()
-
getValue
public String getValue()
-
isDefined
public boolean isDefined()
-
isAuthentication
public boolean isAuthentication()
-
isInSession
public boolean isInSession()
-
-