PHP Class App\Tests\Auth\OAuthServerTest

Inheritance: extends App\Tests\TestCase, use trait Illuminate\Foundation\Testing\DatabaseMigrations
Afficher le fichier Open project: joselfonseca/laravel-api

Méthodes publiques

Méthode Description
itRefreshesTheToken ( ) Once a token is delivered, it can be refreshed by the server.
itRejectsAnExternalRequest ( ) A request to auth/login with no parameters in the body should return error
itRejectsInvalidClient ( ) A request to auth/login with wrong client and secret
itRejectsRequestWithIncompleteBody ( ) If there is an authorized client querying the API but incomplete body should respond with a 400 and the errors
itResolvesClientFromId ( )
itResolvesUserFromId ( )
itValidatesClientCredentials ( )
itValidatesCredentials ( ) If the authorized client request a login with valid credentials it should respond 200
itValidatesWrongCredentials ( ) If an authorized client makes a request with wrong user credentials it should return 401

Method Details

itRefreshesTheToken() public méthode

Once a token is delivered, it can be refreshed by the server.
public itRefreshesTheToken ( )

itRejectsAnExternalRequest() public méthode

A request to auth/login with no parameters in the body should return error

itRejectsInvalidClient() public méthode

A request to auth/login with wrong client and secret

itRejectsRequestWithIncompleteBody() public méthode

If there is an authorized client querying the API but incomplete body should respond with a 400 and the errors

itResolvesClientFromId() public méthode

itResolvesUserFromId() public méthode

itValidatesClientCredentials() public méthode

itValidatesCredentials() public méthode

If the authorized client request a login with valid credentials it should respond 200

itValidatesWrongCredentials() public méthode

If an authorized client makes a request with wrong user credentials it should return 401