public class Authorization extends Object
Authorization header.
The HTTP Authorization header is in the format:
Authorization: <scheme> <token>| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
static Authorization |
fromBasicCredentials(String username,
String secret) |
static Authorization |
fromBasicToken(String token) |
static Authorization |
fromBearerToken(String token) |
String |
getScheme() |
String |
getToken() |
int |
hashCode() |
String |
toString()
Return the HTTP
Authorization header value. |
public static Authorization fromBasicCredentials(String username, String secret)
username - the usernamesecret - the secretAuthorization with a Basic credentialspublic static Authorization fromBasicToken(String token)
token - the tokenAuthorization with a base64-encoded username:password stringpublic static Authorization fromBearerToken(String token)
token - the tokenAuthorization with a Bearer tokenpublic String getScheme()
public String getToken()
public String toString()
Authorization header value.Copyright © 2019. All rights reserved.