PHP Class App\Tests\Auth\OAuthServerTest

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

Public Methods

Method 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 method

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

itRejectsAnExternalRequest() public method

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

itRejectsInvalidClient() public method

A request to auth/login with wrong client and secret

itRejectsRequestWithIncompleteBody() public method

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

itResolvesClientFromId() public method

itResolvesUserFromId() public method

itValidatesClientCredentials() public method

itValidatesCredentials() public method

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

itValidatesWrongCredentials() public method

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