Package: matlab.net.http
Authentication or authorization information in HTTP messages
MATLAB® automatically handles authentication in request messages when you provide
credentials in an HTTPOptions object. Use the AuthInfo class to
examine authentication, to specify authorization information, or to implement an
authentication protocol, such as OAuth, that is not handled
automatically by the MATLAB HTTP interface.
The AuthInfo class represents one authentication challenge returned
when:
You call the AuthenticateField.convert method for a response
message.
You insert credentials in an AuthorizationField header field into a
request message. When you store an AuthInfo object in an Authorization
field, MATLAB automatically encloses values in quotes where required, and inserts escape
characters as needed.
A server returns auth-info data in an
AuthenticationInfoField header field.
The AuthenticateField and AuthorizationField
convert methods convert each name=value pair attribute in
the field to parameter name-and-value pairs in the Parameters property.
Escape characters and any quotes surrounding values are removed.
For more information, see RFC 7235 Authentication and RFC 2617 Host-Imp Interface (for Basic and Digest authentication).
obj = matlab.net.http.AuthInfo(Scheme,
creates an paramName,paramValue)AuthInfo object that includes the Scheme property and optional
paramName,paramValue parameters. You can
specify several argument pairs in any order as
paramName1,paramValue1,...,paramNameN,paramValueN.
obj = matlab.net.http.AuthInfo(
creates an paramName,paramValue)AuthInfo object with an empty Scheme
value.
obj = matlab.net.http.AuthInfo(
copies parameters and values from the fields of pStruct)pStruct.
obj = matlab.net.http.AuthInfo( creates
an pStr)AuthInfo from pStr.
AuthenticateField | AuthenticationInfoField | AuthenticationScheme | AuthorizationField | matlab.net.base64encode | matlab.net.URI | StatusCode