Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 150
Zeile 108... Zeile 108...
108
    {
108
    {
109
        return $this->withHeader('Authorization', $type.' '.$token);
109
        return $this->withHeader('Authorization', $type.' '.$token);
110
    }
110
    }
Zeile 111... Zeile 111...
111
 
111
 
-
 
112
    /**
-
 
113
     * Add a basic authentication header to the request with the given credentials.
-
 
114
     *
-
 
115
     * @param  string  $username
-
 
116
     * @param  string  $password
-
 
117
     * @return $this
-
 
118
     */
-
 
119
    public function withBasicAuth(string $username, string $password)
-
 
120
    {
-
 
121
        return $this->withToken(base64_encode("$username:$password"), 'Basic');
-
 
122
    }
-
 
123
 
112
    /**
124
    /**
113
     * Remove the authorization token from the request.
125
     * Remove the authorization token from the request.
114
     *
126
     *
115
     * @return $this
127
     * @return $this
116
     */
128
     */