mariovalney/laravel-keycloak-web-guard

Sending attributes and they are not written to the user

marciodiasdeveloper opened this issue · 3 comments

sending attributes and they are not written to the user

    if ($user) {
        $data = [
            'email' => $user->email,
            'username' => $user->email,
            'id' => $user->id,
            'firstName' => $user->name,
            'lastName' => '',
            'enabled' => true,
            'emailVerified' => true,
            'attributes' => [
                'cpf' => '111.111.111-11',
                'subdomain' => ['subdomain.domain.com']
            ],
            // 'roles' => ['string'],
            // 'groups' => ['string'],
            'requiredActions' => ['requiredActions']
        ];
        return response()->json($data);
    }

I'm not sure about what you are trying to achieve.
Please, update the thread with more details.

When I send the attributes with the federation user, I can't get access