AuthenticationService v0.3.0+7-g8a7f190
Public Member Functions | Protected Member Functions | Properties | List of all members
BasicAuthorizationHeader Class Reference

Represents the authorization header as it is used for basic authorization. More...

Public Member Functions

override void Validate (String schema)
 Validates the header for a schema. More...
 
- Public Member Functions inherited from AuthorizationHeader
virtual void Validate (String schema)
 Validates the header for a schema. More...
 
bool IsValid (String schema)
 Checks if the header is valid for a schema. More...
 

Protected Member Functions

override String GetHeaderPart (String header, int valuePart)
 Extracts a certain part of the header. More...
 
virtual String GetHeaderPart (String header, int valuePart)
 Extracts a certain part of the header. More...
 

Properties

String User [get]
 The username contained in the header. More...
 
String Password [get]
 The password contained in the header. More...
 
- Properties inherited from AuthorizationHeader
String Header [get, set]
 the complete header. More...
 
String Schema [get]
 The schema contained in the header. More...
 

Additional Inherited Members

- Protected Attributes inherited from AuthorizationHeader
String[] parts
 The parts of the split header. More...
 
- Static Protected Attributes inherited from AuthorizationHeader
const int SCHEMA_HEADER_PART = 0
 Defines the segment containing schema information in the split header. More...
 

Detailed Description

Represents the authorization header as it is used for basic authorization.

Since
0.3.0

Member Function Documentation

◆ GetHeaderPart()

override String BasicAuthorizationHeader.GetHeaderPart ( String  header,
int  valuePart 
)
protectedvirtual

Extracts a certain part of the header.

Parameters
headerthe complete header
valuePartthe part to retrieve as a number
Returns
the extracted part of the header throws AuthorizationException if the credentials are not base64 encoded in a UTF8 string

Reimplemented from AuthorizationHeader.

◆ Validate()

override void BasicAuthorizationHeader.Validate ( String  schema)
virtual

Validates the header for a schema.

Parameters
schemathe expected schema
Exceptions
AuthorizationExceptionif the header is empty, does not match the expected schema or does not contain the full credentials.

Reimplemented from AuthorizationHeader.

Property Documentation

◆ Password

String BasicAuthorizationHeader.Password
get

The password contained in the header.

◆ User

String BasicAuthorizationHeader.User
get

The username contained in the header.