pub struct Access<'a> { /* private fields */ }Implementations§
Source§impl<'a> Access<'a>
impl<'a> Access<'a>
Sourcepub async fn log_out_complete(&self) -> Result<(), NifiError>
pub async fn log_out_complete(&self) -> Result<(), NifiError>
Completes the logout sequence by removing the cached Logout Request and Cookie if they existed and redirects to /nifi/login.
Note: This endpoint is subject to change as NiFi and it’s REST API evolve.
Calls GET /nifi-api/access/logout/complete.
§Returns
302: User was logged out successfully.
§Errors
401: Authentication token provided was empty or not in the correct JWT format.500: Client failed to log out.
Sourcepub async fn create_access_token(&self) -> Result<String, NifiError>
pub async fn create_access_token(&self) -> Result<String, NifiError>
Creates a token for accessing the REST API via username/password
The token returned is formatted as a JSON Web Token (JWT). The token is base64 encoded and comprised of three parts. The header, the body, and the signature. The expiration of the token is a contained within the body. It is stored in the browser as a cookie, but also returned inthe response body to be stored/used by third party client scripts.
Calls POST /nifi-api/access/token.
§Errors
400: NiFi was unable to complete the request because it was invalid. The request should not be retried without modification.403: Client is not authorized to make this request.409: The request was valid but NiFi was not in the appropriate state to process it.500: Unable to create access token because an unexpected error occurred.
§Permissions
No authentication required.
Sourcepub async fn log_out(&self) -> Result<(), NifiError>
pub async fn log_out(&self) -> Result<(), NifiError>
Performs a logout for other providers that have been issued a JWT.
Note: This endpoint is subject to change as NiFi and it’s REST API evolve.
Calls DELETE /nifi-api/access/logout.
§Returns
200: User was logged out successfully.
§Errors
401: Authentication token provided was empty or not in the correct JWT format.500: Client failed to log out.