Authorization

final implicit
class Authorization(request: HttpRequest) extends AnyVal

Provides standardized access to Authorization header.

class AnyVal
trait Matchable
class Any

Value members

Concrete methods

Gets Authorization header value.

Gets Authorization header value.

Throws
HeaderNotFound

if Authorization is not present

Gets basic authorization.

Gets basic authorization.

Throws
HttpException

if basic authorization is not present

Gets bearer authorization.

Gets bearer authorization.

Throws
HttpException

if bearer authorization is not present

Gets Authorization header value if present.

Gets Authorization header value if present.

Gets basic authorization if present.

Gets basic authorization if present.

Gets bearer authorization if present.

Gets bearer authorization if present.

def hasAuthorization: Boolean

Tests for Authorization header.

Tests for Authorization header.

def hasBasic: Boolean

Tests for basic authorization.

Tests for basic authorization.

def hasBearer: Boolean

Tests for bearer authorization.

Tests for bearer authorization.

Creates new request with Authorization header removed.

Creates new request with Authorization header removed.

Creates new request with Authorization header set to supplied value.

Creates new request with Authorization header set to supplied value.

def setBasic(token: String): HttpRequest

Creates new request with basic authorization.

Creates new request with basic authorization.

def setBasic(user: String, password: String): HttpRequest

Creates new request with basic authorization.

Creates new request with basic authorization.

Creates new request with basic authorization.

Creates new request with basic authorization.

def setBearer(token: String): HttpRequest

Creates new request with bearer authorization.

Creates new request with bearer authorization.

Creates new request with bearer authorization.

Creates new request with bearer authorization.