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

Represents the authorization header sent to an application. More...

Public Member Functions

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

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

Protected Attributes

String[] parts
 The parts of the split header. More...
 

Static Protected Attributes

const int SCHEMA_HEADER_PART = 0
 Defines the segment containing schema information in the split header. More...
 

Properties

String Header [get, set]
 the complete header. More...
 
String Schema [get]
 The schema contained in the header. More...
 

Detailed Description

Represents the authorization header sent to an application.

Since
0.3.0

Member Function Documentation

◆ GetHeaderPart()

virtual String AuthorizationHeader.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

Reimplemented in BasicAuthorizationHeader.

◆ IsValid()

bool AuthorizationHeader.IsValid ( String  schema)

Checks if the header is valid for a schema.

Parameters
schemathe expected schema
Returns
false if the header is empty or does not match the expected schema, otherwise true

◆ Validate()

virtual void AuthorizationHeader.Validate ( String  schema)
virtual

Validates the header for a schema.

Parameters
schemathe expected schema
Exceptions
AuthorizationExceptionif the header is empty or does not match the expected schema.

Reimplemented in BasicAuthorizationHeader.

Member Data Documentation

◆ parts

String [] AuthorizationHeader.parts
protected

The parts of the split header.

◆ SCHEMA_HEADER_PART

const int AuthorizationHeader.SCHEMA_HEADER_PART = 0
staticprotected

Defines the segment containing schema information in the split header.

Property Documentation

◆ Header

String AuthorizationHeader.Header
getset

the complete header.

◆ Schema

String AuthorizationHeader.Schema
get

The schema contained in the header.