implicit final class Authorization extends AnyVal
Provides standardized access to Authorization header.
- Alphabetic
- By Inheritance
- Authorization
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Authorization(request: HttpRequest)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
authorization: Credentials
Gets Authorization header value.
Gets Authorization header value.
- Exceptions thrown
HeaderNotFound
if Authorization is not present
-
def
basic: BasicCredentials
Gets basic authorization.
Gets basic authorization.
- Exceptions thrown
HttpException
if basic authorization is not present
-
def
bearer: BearerCredentials
Gets bearer authorization.
Gets bearer authorization.
- Exceptions thrown
HttpException
if bearer authorization is not present
-
def
getAuthorization: Option[Credentials]
Gets Authorization header value if present.
-
def
getBasic: Option[BasicCredentials]
Gets basic authorization if present.
-
def
getBearer: Option[BearerCredentials]
Gets bearer authorization if present.
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
def
hasAuthorization: Boolean
Tests for Authorization header.
-
def
hasBasic: Boolean
Tests for basic authorization.
-
def
hasBearer: Boolean
Tests for bearer authorization.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
removeAuthorization: HttpRequest
Creates new request removing Authorization header.
-
def
setAuthorization(value: Credentials): HttpRequest
Creates new request setting Authorization header to supplied value.
-
def
setBasic(credentials: BasicCredentials): HttpRequest
Creates new request with basic authorization.
-
def
setBasic(user: String, password: String): HttpRequest
Creates new request with basic authorization.
-
def
setBasic(token: String): HttpRequest
Creates new request with basic authorization.
-
def
setBearer(credentials: BearerCredentials): HttpRequest
Creates new request with bearer authorization.
-
def
setBearer(token: String): HttpRequest
Creates new request with bearer authorization.
-
def
toString(): String
- Definition Classes
- Any
Provided herein is API documentation for Scamper, the HTTP library for Scala.