public class Auth extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Auth.authenticationTypes |
class |
Auth.User
Inner class representing an authenticated user.
|
Modifier and Type | Field and Description |
---|---|
static String |
PASSWORD |
static String |
SESSION_COOKIE |
static String |
UID |
Constructor and Description |
---|
Auth()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
clear()
Clears authentication data.
|
static org.openqa.selenium.Cookie |
getAuthenticationCookie(String domainUrl)
Returns a Cookie object by retrieving data from -Dcookie maven parameter.
|
static Auth |
getInstance()
Get auth singleton.
|
static String |
getLogin()
Gets current user login if direct authentication is used.
|
static String |
getPassword()
Gets current user password if direct authentication is used.
|
static boolean |
isConnected()
Returns true if current user is connected, false otherwise
|
static void |
loadAuthenticationCookie(org.openqa.selenium.Cookie cookie)
Loads authentication cookie in the current web browsers.
|
static void |
setAuthenticationType(String type)
Sets the authentication mode.
|
static void |
setConnected(boolean isConnected)
Save the value of current user's authentication (true if connected, false otherwise)
|
static String |
usingAuthentication(String url)
Process a given url using the current authentication mode.
|
public static final String SESSION_COOKIE
public static final String UID
public static final String PASSWORD
public static Auth getInstance()
public static void setConnected(boolean isConnected)
isConnected
- value of authenticationpublic static void setAuthenticationType(String type)
Auth.authenticationTypes
.type
- type of authenticationpublic static boolean isConnected()
public static String getLogin()
public static String getPassword()
public static org.openqa.selenium.Cookie getAuthenticationCookie(String domainUrl) throws TechnicalException
domainUrl
- the domain on which the cookie is appliedTechnicalException
- with a message (no screenshot, no exception)public static void loadAuthenticationCookie(org.openqa.selenium.Cookie cookie)
cookie
- the Cookie
instance to set to the current web browser.public static String usingAuthentication(String url)
url
- url to access behind authenticationpublic static void clear()
Copyright © 2023 NoraUi. All rights reserved.