Part of lp.services.openid.extensions.macaroon View In Hierarchy
An object to hold the state of a discharge macaroon request. @ivar caveat_id: The SSO third-party caveat ID from the root macaroon that the RP wants to discharge. @type caveat_id: str @group Consumer: requestField, getExtensionArgs, addToOpenIDRequest @group Server: fromOpenIDRequest, parseExtensionArgs
Method | __init__ | Initialize an empty discharge macaroon request. |
Class Method | fromOpenIDRequest | Create a discharge macaroon request that contains the fields that |
Method | parseExtensionArgs | Parse the unqualified macaroon request parameters and add them to |
Method | getExtensionArgs | Get a dictionary of unqualified macaroon request parameters |
@param request: The OpenID request @type request: openid.server.CheckIDRequest
@returns: The newly-created discharge macaroon request @rtype: C{L{MacaroonRequest}}
This method is essentially the inverse of C{L{getExtensionArgs}}. It restores the serialized macaroon request fields.
If you are extracting arguments from a standard OpenID checkid_* request, you probably want to use C{L{fromOpenIDRequest}}, which will extract the macaroon namespace and arguments from the OpenID request. This method is intended for cases where the OpenID server needs more control over how the arguments are parsed than that method provides.
args = message.getArgs(MACAROON_NS) request.parseExtensionArgs(args)
@param args: The unqualified macaroon arguments @type args: {str:str}
@returns: None; updates this object