2021-06-13 14:35:07 +01:00
<!DOCTYPE html>
< html lang = "en" >
< head >
< meta charset = "UTF-8" >
< title > Code Coverage for /Users/barnabywalters/Documents/Programming/taproot/indieauth/src/Callback/AuthorizationFormInterface.php< / title >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< link href = "../_css/bootstrap.min.css" rel = "stylesheet" type = "text/css" >
< link href = "../_css/octicons.css" rel = "stylesheet" type = "text/css" >
< link href = "../_css/style.css" rel = "stylesheet" type = "text/css" >
< link href = "../_css/custom.css" rel = "stylesheet" type = "text/css" >
< / head >
< body >
< header >
< div class = "container-fluid" >
< div class = "row" >
< div class = "col-md-12" >
< nav aria-label = "breadcrumb" >
< ol class = "breadcrumb" >
< li class = "breadcrumb-item" > < a href = "../index.html" > /Users/barnabywalters/Documents/Programming/taproot/indieauth/src< / a > < / li >
< li class = "breadcrumb-item" > < a href = "index.html" > Callback< / a > < / li >
< li class = "breadcrumb-item active" > AuthorizationFormInterface.php< / li >
< / ol >
< / nav >
< / div >
< / div >
< / div >
< / header >
< div class = "container-fluid" >
< div class = "table-responsive" >
< table class = "table table-bordered" >
< thead >
< tr >
< td > < / td >
< td colspan = "10" > < div align = "center" > < strong > Code Coverage< / strong > < / div > < / td >
< / tr >
< tr >
< td > < / td >
< td colspan = "3" > < div align = "center" > < strong > Classes and Traits< / strong > < / div > < / td >
< td colspan = "4" > < div align = "center" > < strong > Functions and Methods< / strong > < / div > < / td >
< td colspan = "3" > < div align = "center" > < strong > Lines< / strong > < / div > < / td >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "" > Total< / td >
< td class = " big" > < / td >
< td class = " small" > < div align = "right" > n/a< / div > < / td >
< td class = " small" > < div align = "right" > 0 / 0< / div > < / td >
< td class = " big" > < / td >
< td class = " small" > < div align = "right" > n/a< / div > < / td >
< td class = " small" > < div align = "right" > 0 / 0< / div > < / td >
< td class = " small" > < abbr title = "Change Risk Anti-Patterns (CRAP) Index" > CRAP< / abbr > < / td >
< td class = " big" > < / td >
< td class = " small" > < div align = "right" > n/a< / div > < / td >
< td class = " small" > < div align = "right" > 0 / 0< / div > < / td >
< / tr >
< / tbody >
< / table >
< / div >
< table id = "code" class = "table table-borderless table-condensed" >
< tbody >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "1" href = "#1" > 1< / a > < / td > < td class = "col-11 codeLine" > < span class = "default" > < ?php < / span > < span class = "keyword" > declare< / span > < span class = "keyword" > (< / span > < span class = "default" > strict_types< / span > < span class = "keyword" > =< / span > < span class = "default" > 1< / span > < span class = "keyword" > )< / span > < span class = "keyword" > ;< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "2" href = "#2" > 2< / a > < / td > < td class = "col-11 codeLine" > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "3" href = "#3" > 3< / a > < / td > < td class = "col-11 codeLine" > < span class = "keyword" > namespace< / span > < span class = "default" > < / span > < span class = "default" > Taproot< / span > < span class = "default" > \< / span > < span class = "default" > IndieAuth< / span > < span class = "default" > \< / span > < span class = "default" > Callback< / span > < span class = "keyword" > ;< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "4" href = "#4" > 4< / a > < / td > < td class = "col-11 codeLine" > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "5" href = "#5" > 5< / a > < / td > < td class = "col-11 codeLine" > < span class = "keyword" > use< / span > < span class = "default" > < / span > < span class = "default" > Psr< / span > < span class = "default" > \< / span > < span class = "default" > Http< / span > < span class = "default" > \< / span > < span class = "default" > Message< / span > < span class = "default" > \< / span > < span class = "default" > ServerRequestInterface< / span > < span class = "keyword" > ;< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "6" href = "#6" > 6< / a > < / td > < td class = "col-11 codeLine" > < span class = "keyword" > use< / span > < span class = "default" > < / span > < span class = "default" > Psr< / span > < span class = "default" > \< / span > < span class = "default" > Http< / span > < span class = "default" > \< / span > < span class = "default" > Message< / span > < span class = "default" > \< / span > < span class = "default" > ResponseInterface< / span > < span class = "keyword" > ;< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "7" href = "#7" > 7< / a > < / td > < td class = "col-11 codeLine" > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "8" href = "#8" > 8< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > /**< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "9" href = "#9" > 9< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * Authorization Form Interface< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "10" href = "#10" > 10< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > */< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "11" href = "#11" > 11< / a > < / td > < td class = "col-11 codeLine" > < span class = "keyword" > interface< / span > < span class = "default" > < / span > < span class = "default" > AuthorizationFormInterface< / span > < span class = "default" > < / span > < span class = "keyword" > {< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "12" href = "#12" > 12< / a > < / td > < td class = "col-11 codeLine" > < span class = "default" > < / span > < span class = "comment" > /**< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "13" href = "#13" > 13< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * Show Form< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "14" href = "#14" > 14< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "15" href = "#15" > 15< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * This method is called once the IndieAuth Authorization Endpoint has confirmed that:< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "16" href = "#16" > 16< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "17" href = "#17" > 17< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * * The current user is authenticated< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "18" href = "#18" > 18< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * * The client app (client_id) has been fetched and is valid< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "19" href = "#19" > 19< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * * The client app redirect_uri is known to be valid< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "20" href = "#20" > 20< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "21" href = "#21" > 21< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * It should build an authorization form which the currently logged-in user can use< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "22" href = "#22" > 22< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * to choose which scopes (if any) to grant the app.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "23" href = "#23" > 23< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "24" href = "#24" > 24< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * Information specific to the IndieAuth authorization request can be found in< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "25" href = "#25" > 25< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * `$request-> getQueryParams()`. The parameters most likely to be of use to the authorization< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "26" href = "#26" > 26< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * form are:< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "27" href = "#27" > 27< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "28" href = "#28" > 28< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * * `scope`: a space-separated list of scopes which the client app is requesting. May be absent.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "29" href = "#29" > 29< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * * `client_id`: the URL of the client app. Should be shown to the user. This also makes a good “cancel” link.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "30" href = "#30" > 30< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * * `redirect_uri`: the URI which the user will be redirected to on successful authorization. < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "31" href = "#31" > 31< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "32" href = "#32" > 32< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * The form MUST submit a POST request to `$formAction`, with the `taproot_indieauth_action`< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "33" href = "#33" > 33< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * parameter set to `approve`.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "34" href = "#34" > 34< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "35" href = "#35" > 35< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * The form MUST additionally include any CSRF tokens required to protect the submission.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "36" href = "#36" > 36< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * Refer to whatever CSRF protection code you’ re using (e.g. `\Taproot\IndieAuth\Middleware\DoubleSubmitCookieCsrfMiddleware`)< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "37" href = "#37" > 37< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * and make sure to include the required element. This will usually involve getting a< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "38" href = "#38" > 38< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * CSRF token with `$request-> getAttribute()` and including it in an `< input type=" hidden" …/> `.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "39" href = "#39" > 39< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "40" href = "#40" > 40< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * The form SHOULD offer the user the opportunity to choose which of the request scopes, < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "41" href = "#41" > 41< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * if any, they wish to grant. It should describe what effect each scope grants. If no scopes are < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "42" href = "#42" > 42< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * requested, tell the user that the app is only requesting authorization, not access to their data.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "43" href = "#43" > 43< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "44" href = "#44" > 44< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * The form MAY offer the user UIs for additional token configuration, e.g. a custom token lifetime.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "45" href = "#45" > 45< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * You may have to refer to the documentation for your instance of `TokenStorageInterface` to ensure< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "46" href = "#46" > 46< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * that lifetime configuration works correctly. Any other additional data is not used by the IndieAuth< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "47" href = "#47" > 47< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * library, but, if stored on the access token, will be available to your app for use.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "48" href = "#48" > 48< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "49" href = "#49" > 49< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * @param ServerRequestInterface $request The current request.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "50" href = "#50" > 50< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * @param array $authenticationResult The array returned from the Authentication Handler. Guaranteed to contain a 'me' key, may also contain additional keys e.g. 'profile'.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "51" href = "#51" > 51< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * @param string $formAction The URL which your form MUST submit to. Can also be used as the redirect URL for a logout process.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "52" href = "#52" > 52< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * @param array|null $clientHApp If available, the microformats-2 structure representing the client app.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "53" href = "#53" > 53< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * @return ResponseInterface A response containing the authorization form.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "54" href = "#54" > 54< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > */< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "55" href = "#55" > 55< / a > < / td > < td class = "col-11 codeLine" > < span class = "default" > < / span > < span class = "keyword" > public< / span > < span class = "default" > < / span > < span class = "keyword" > function< / span > < span class = "default" > < / span > < span class = "default" > showForm< / span > < span class = "keyword" > (< / span > < span class = "default" > ServerRequestInterface< / span > < span class = "default" > < / span > < span class = "default" > $request< / span > < span class = "keyword" > ,< / span > < span class = "default" > < / span > < span class = "keyword" > array< / span > < span class = "default" > < / span > < span class = "default" > $authenticationResult< / span > < span class = "keyword" > ,< / span > < span class = "default" > < / span > < span class = "default" > string< / span > < span class = "default" > < / span > < span class = "default" > $formAction< / span > < span class = "keyword" > ,< / span > < span class = "default" > < / span > < span class = "keyword" > ?< / span > < span class = "keyword" > array< / span > < span class = "default" > < / span > < span class = "default" > $clientHApp< / span > < span class = "keyword" > )< / span > < span class = "keyword" > :< / span > < span class = "default" > < / span > < span class = "default" > ResponseInterface< / span > < span class = "keyword" > ;< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "56" href = "#56" > 56< / a > < / td > < td class = "col-11 codeLine" > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "57" href = "#57" > 57< / a > < / td > < td class = "col-11 codeLine" > < span class = "default" > < / span > < span class = "comment" > /**< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "58" href = "#58" > 58< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * Transform Authorization Code< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "59" href = "#59" > 59< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "60" href = "#60" > 60< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * This method is called on a successful authorization form submission. The `$code` array< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "61" href = "#61" > 61< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * is a partially-constructed authorization code array, which is guaranteed to have the < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "62" href = "#62" > 62< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * following keys:< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "63" href = "#63" > 63< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "64" href = "#64" > 64< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * * `client_id`: the validated `client_id` request parameter< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "65" href = "#65" > 65< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * * `redirect_uri`: the validated `redirect_uri` request parameter< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "66" href = "#66" > 66< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * * `state`: the `state` request parameter< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "67" href = "#67" > 67< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * * `code_challenge`: the `code_challenge` request parameter< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "68" href = "#68" > 68< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * * `code_challenge_method`: the `code_challenge_method` request parameter< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "69" href = "#69" > 69< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * * `requested_scope`: the value of the `scope` request parameter< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "70" href = "#70" > 70< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * * `me`: the value of the `me` key from the authentication result returned from the authentication request handler callback< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "71" href = "#71" > 71< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "72" href = "#72" > 72< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * It may also have additional keys, which can come from the following locations:< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "73" href = "#73" > 73< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "74" href = "#74" > 74< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * * All keys from the the authentication request handler callback result which do not clash < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "75" href = "#75" > 75< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * with the keys listed above (with the exception of `me`, which is always present). Usually< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "76" href = "#76" > 76< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * this is a `profile` key, but you may choose to return additional data from the authentication< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "77" href = "#77" > 77< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * callback, which will be present in `$data`.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "78" href = "#78" > 78< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "79" href = "#79" > 79< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * This method should add any additional data to the auth code, before it is persisted and< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "80" href = "#80" > 80< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * returned to the client app. Typically, this involves setting the `scope` key to be a < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "81" href = "#81" > 81< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * valid space-separated scope string of any scopes granted by the user in the form.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "82" href = "#82" > 82< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "83" href = "#83" > 83< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * If the form offers additional token configuration, this method should set any relevant< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "84" href = "#84" > 84< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * keys in `$code` based on the form data in `$request`.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "85" href = "#85" > 85< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * < / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "86" href = "#86" > 86< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * @param array $code The base authorization code data, to be added to.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "87" href = "#87" > 87< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * @param ServerRequestInterface $request The current request.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "88" href = "#88" > 88< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > * @return array The $code data after making any necessary changes.< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "89" href = "#89" > 89< / a > < / td > < td class = "col-11 codeLine" > < span class = "comment" > */< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "90" href = "#90" > 90< / a > < / td > < td class = "col-11 codeLine" > < span class = "default" > < / span > < span class = "keyword" > public< / span > < span class = "default" > < / span > < span class = "keyword" > function< / span > < span class = "default" > < / span > < span class = "default" > transformAuthorizationCode< / span > < span class = "keyword" > (< / span > < span class = "default" > ServerRequestInterface< / span > < span class = "default" > < / span > < span class = "default" > $request< / span > < span class = "keyword" > ,< / span > < span class = "default" > < / span > < span class = "keyword" > array< / span > < span class = "default" > < / span > < span class = "default" > $code< / span > < span class = "keyword" > )< / span > < span class = "keyword" > :< / span > < span class = "default" > < / span > < span class = "keyword" > array< / span > < span class = "keyword" > ;< / span > < / td > < / tr >
< tr class = " d-flex" > < td class = "col-1 text-right" > < a id = "91" href = "#91" > 91< / a > < / td > < td class = "col-11 codeLine" > < span class = "keyword" > }< / span > < / td > < / tr >
< / tbody >
< / table >
< footer >
< hr / >
< h4 > Legend< / h4 >
< p > < span class = "success" > < strong > Executed< / strong > < / span > < span class = "danger" > < strong > Not Executed< / strong > < / span > < span class = "warning" > < strong > Dead Code< / strong > < / span > < / p >
< p >
2021-06-13 14:37:41 +01:00
< small > Generated by < a href = "https://github.com/sebastianbergmann/php-code-coverage" target = "_top" > php-code-coverage 9.2.6< / a > using < a href = "https://secure.php.net/" target = "_top" > PHP 7.4.19< / a > with < a href = "https://xdebug.org/" > Xdebug 3.0.4< / a > and < a href = "https://phpunit.de/" > PHPUnit 9.5.5< / a > at Sun Jun 13 13:37:29 UTC 2021.< / small >
2021-06-13 14:35:07 +01:00
< / p >
< a title = "Back to the top" id = "toplink" href = "#" >
< svg xmlns = "http://www.w3.org/2000/svg" width = "12" height = "16" viewBox = "0 0 12 16" > < path fill-rule = "evenodd" d = "M12 11L6 5l-6 6h12z" / > < / svg >
< / a >
< / footer >
< / div >
< script src = "../_js/jquery.min.js" type = "text/javascript" > < / script >
< script src = "../_js/popper.min.js" type = "text/javascript" > < / script >
< script src = "../_js/bootstrap.min.js" type = "text/javascript" > < / script >
< script src = "../_js/file.js" type = "text/javascript" > < / script >
< / body >
< / html >