com.pcbsys.nirvana.client.nUserAuthentication Class Reference
The nUserAuthentication class provides the ability to perform basic HTTP athentication to a nirvana realm running a file plugin with authentication turned on. More...

Public Member Functions | |
| String | getAuthUser () |
| Obtain the username as returned from the server authentication. | |
| String | getDescription () |
| Obtain the description associated with the authenticated user. | |
| String[] | getGroupDescription () |
| Obtain the list of authorized group descriptions to which this user belongs, as denoted by the chosen authenticator on the realm plugin. | |
| int[] | getGroupId () |
| Obtain the list of authorized group ids to which this user belongs, as denoted by the chosen authenticator on the realm plugin. | |
| String[] | getGroupName () |
| Obtain the list of authorized groups to which this user belongs, as denoted by the chosen authenticator on the realm plugin. | |
| String | getHomeId () |
| Obtain the home group of the authenticated user. | |
| BitSet | getPermissions () |
| Obtain the BitSet representing the permissions allocated to this user. | |
| String | getToken () |
| Obtain the token generated by the server if one was requested. | |
| String | getUsername () |
| Obtain the username passed into the authentication. | |
| boolean | isValid () |
| Determine whether authentication was successful. | |
| nUserAuthentication (String username, String password, String authUrl, int authType, boolean requestToken) throws IOException | |
| Construct the authentication with as user name, password and the URL of the authenticating Nirvana plugin. | |
| nUserAuthentication (String username, String password, String authUrl, int authType) throws IOException | |
| Construct the authentication with as user name, password and the URL of the authenticating Nirvana plugin. | |
| nUserAuthentication (String username, String password, String authUrl) throws IOException | |
| Construct the authentication with as user name, password and the URL of the authenticating Nirvana plugin This will use BASIC auth mode. | |
| nUserAuthentication (URLConnection urlConnection) throws IOException | |
| Construct the authentication with a url connection in order to extract the information required. | |
Static Public Attributes | |
| static final int | BASIC = 0 |
| Use BASIC HTTP authentication. | |
| static final int | DIGEST = 1 |
| Use DIGEST based HTTP authentication. | |
| static final int | FORM = 2 |
| Use FORM based HTTP POST authentication. | |
Detailed Description
The nUserAuthentication class provides the ability to perform basic HTTP athentication to a nirvana realm running a file plugin with authentication turned on.Constructor & Destructor Documentation
| com.pcbsys.nirvana.client.nUserAuthentication.nUserAuthentication | ( | URLConnection | urlConnection | ) | throws IOException |
Construct the authentication with a url connection in order to extract the information required.
- Parameters:
-
urlConnection the url connection established to extract the information for authentication
- Exceptions:
-
IOException thrown should there be any problems authenticating or accessing the url
| com.pcbsys.nirvana.client.nUserAuthentication.nUserAuthentication | ( | String | username, | |
| String | password, | |||
| String | authUrl | |||
| ) | throws IOException |
Construct the authentication with as user name, password and the URL of the authenticating Nirvana plugin This will use BASIC auth mode.
- Parameters:
-
username the username to be authenticated password the password to use for authentication authUrl the url to use for the authentication
- Exceptions:
-
IOException thrown should there be any problems authenticating or accessing the url
| com.pcbsys.nirvana.client.nUserAuthentication.nUserAuthentication | ( | String | username, | |
| String | password, | |||
| String | authUrl, | |||
| int | authType | |||
| ) | throws IOException |
Construct the authentication with as user name, password and the URL of the authenticating Nirvana plugin.
- Parameters:
-
username the username to be authenticated password the password to use for authentication authUrl the url to use for the authentication authType the type of authentication to use (BASIC/DIGEST)
- Exceptions:
-
IOException thrown should there be any problems authenticating or accessing the url
| com.pcbsys.nirvana.client.nUserAuthentication.nUserAuthentication | ( | String | username, | |
| String | password, | |||
| String | authUrl, | |||
| int | authType, | |||
| boolean | requestToken | |||
| ) | throws IOException |
Construct the authentication with as user name, password and the URL of the authenticating Nirvana plugin.
- Parameters:
-
username the username to be authenticated password the password to use for authentication authUrl the url to use for the authentication authType the type of authentication to use (BASIC/DIGEST) requestToken request to generate a token for the authentication
- Exceptions:
-
IOException thrown should there be any problems authenticating or accessing the url
Member Function Documentation
| String com.pcbsys.nirvana.client.nUserAuthentication.getAuthUser | ( | ) |
Obtain the username as returned from the server authentication.
- Returns:
- the server returned user name
| String com.pcbsys.nirvana.client.nUserAuthentication.getDescription | ( | ) |
Obtain the description associated with the authenticated user.
- Returns:
- the user description as denoted by the server's plugin authenticator
| String [] com.pcbsys.nirvana.client.nUserAuthentication.getGroupDescription | ( | ) |
Obtain the list of authorized group descriptions to which this user belongs, as denoted by the chosen authenticator on the realm plugin.
- Returns:
- a list of group descriptions this user belongs
| int [] com.pcbsys.nirvana.client.nUserAuthentication.getGroupId | ( | ) |
Obtain the list of authorized group ids to which this user belongs, as denoted by the chosen authenticator on the realm plugin.
- Returns:
- a list of group ids this user belongs
| String [] com.pcbsys.nirvana.client.nUserAuthentication.getGroupName | ( | ) |
Obtain the list of authorized groups to which this user belongs, as denoted by the chosen authenticator on the realm plugin.
- Returns:
- a list of groups this user belongs
| String com.pcbsys.nirvana.client.nUserAuthentication.getHomeId | ( | ) |
Obtain the home group of the authenticated user.
- Returns:
- the users' home group
| BitSet com.pcbsys.nirvana.client.nUserAuthentication.getPermissions | ( | ) |
Obtain the BitSet representing the permissions allocated to this user.
- Returns:
- the BitSet of permissions
| String com.pcbsys.nirvana.client.nUserAuthentication.getToken | ( | ) |
Obtain the token generated by the server if one was requested.
- Returns:
- the generated token
| String com.pcbsys.nirvana.client.nUserAuthentication.getUsername | ( | ) |
Obtain the username passed into the authentication.
- Returns:
- the user name
| boolean com.pcbsys.nirvana.client.nUserAuthentication.isValid | ( | ) |
Determine whether authentication was successful.
- Returns:
- true if successful, else false
