public class BasicCredentials extends Object
| Constructor and Description |
|---|
BasicCredentials(String userId,
String password)
Constructor with credentials.
|
| Modifier and Type | Method and Description |
|---|---|
String |
format()
Create a value suitable as the value of
Authorization header. |
String |
getPassword()
Get the password.
|
String |
getUserId()
Get the user ID.
|
static BasicCredentials |
parse(String input)
Parse
Authorization header for Basic authentication. |
public String getUserId()
public String getPassword()
public static BasicCredentials parse(String input)
Authorization header for Basic authentication.input - The value of Authorization header. Expected inputs
are either "Basic {Base64-Encoded-UserID-and-Password}",
or "{Base64-Encoded-UserID-and-Password}".input is null is returned.public String format()
Authorization header.Authorization header value for Basic authentication.Copyright © 2017. All rights reserved.