public function getCredentials(Request $request)
    {
        $post = json_decode($request->getContent(), true);

        return new CredentialTokenModel($post[self::TOKEN_FIELD]);
    }
public function getCredentials(Request $request)
    {
        $post = json_decode($request->getContent(), true);

        return new CredentialTokenModel($post[self::TOKEN_FIELD]);
    }
public function getCredentials ( Request $ request ) { $ post = json_decode ( $ request -> getContent ( ) , true ) ; return new CredentialTokenModel ( $ post [ self :: TOKEN_FIELD ] ) ; }
2) Returns CredentialTokenModel with json field token

@param Request $request
@return CredentialTokenModel
2 ) Returns CredentialTokenModel with json field token