Skip to content

v2.1.0

Compare
Choose a tag to compare
@sfelix-martins sfelix-martins released this 29 Aug 01:59
e30e435

Added

  • Add new trait SMartins\PassportMultiauth\HasMultiAuthApiTokens that uses the Laravel Passport core trait Laravel\Passport\HasApiTokens. The new trait override the methods createToken($name, $scopes = []) and tokens() to adapt to MultiAuthentication needs.

  • Now to create Personal Access Token don't need add param providers on request to route wrapped by middleware SMartins\PassportMultiauth\Http\Middleware\AddCustomProvider. Just call the method createToken($name) using the model instance that uses the new trait SMartins\PassportMultiauth\HasMultiAuthApiTokens.

  • The method tokens() now get just the related tokens with model calling.