Top Description Constructors Methods
javax.security.enterprise.credential

public Class BasicAuthenticationCredential

extends UsernamePasswordCredential
Class Inheritance
Imports
java.io.UnsupportedEncodingException, java.util.Base64

BasicAuthenticationCredential extends UsernamePasswordCredential to represent credentials used by HTTP Basic Authentication.

Constructor Summary

AccessConstructor and Description
public
BasicAuthenticationCredential(String
HTTP Basic Authentication header
authorizationHeader
)

Constructor

Method Summary

Modifier and TypeMethod and Description
private static String

Returns:

The decoded header
decodeHeader
(String
The encoded header
authorizationHeader
)

Utility for decoding the HTTP Basic Authentication header.

private static Password

Returns:

The password
parsePassword
(String
The encoded header
authorizationHeader
)

Utility for parsing the HTTP Basic Authentication password.

private static String

Returns:

The username
parseUsername
(String
The encoded header
authorizationHeader
)

Utility for parsing the HTTP Basic Authentication username.

Inherited from javax.security.enterprise.credential.UsernamePasswordCredential:
clearCredentialcompareTogetCallergetPasswordgetPasswordAsString

Constructor Detail

BasicAuthenticationCredentialback to summary
public BasicAuthenticationCredential(String authorizationHeader)

Constructor

Parameters
authorizationHeader:String

HTTP Basic Authentication header

Method Detail

decodeHeaderback to summary
private static String decodeHeader(String authorizationHeader)

Utility for decoding the HTTP Basic Authentication header.

Parameters
authorizationHeader:String

The encoded header

Returns:String

The decoded header

parsePasswordback to summary
private static Password parsePassword(String authorizationHeader)

Utility for parsing the HTTP Basic Authentication password.

Parameters
authorizationHeader:String

The encoded header

Returns:Password

The password

parseUsernameback to summary
private static String parseUsername(String authorizationHeader)

Utility for parsing the HTTP Basic Authentication username.

Parameters
authorizationHeader:String

The encoded header

Returns:String

The username