PHPackages                             ikerib/giltza-oauth2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. ikerib/giltza-oauth2

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

ikerib/giltza-oauth2
====================

Izenperen Giltza oauth2 zerbitzua erabiltzeko oauth2 bezeroa

1.0(3y ago)13151MITPHP

Since Mar 22Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ikerib/giltza-oauth2)[ Packagist](https://packagist.org/packages/ikerib/giltza-oauth2)[ RSS](/packages/ikerib-giltza-oauth2/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (1)

Giltza Provider for OAuth 2.0 Client
====================================

[](#giltza-provider-for-oauth-20-client)

This package provides Giltza OAuth 2.0 support for the PHP League's [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client).

Installation
------------

[](#installation)

To install, use composer:

```
composer require ikerib/giltza-oauth2

```

KnpUOAuth2ClientBundle-rekin batera erabiltzeko.

```
https://github.com/knpuniversity/oauth2-client-bundle

```

Aurrena IZFE-ri zure aplikazioak garatu ahal izateko eskaera egin behar zaio erabiltzaile eta pasahitza lor ditzazun.

Behin edukita, KnpUOAuth2ClientBundle instalatu eta liburutegi hau.

Symfony-ren CustomAuthenticator bat sortu eta bertan authenticate funtzioa:

```
public function authenticate(Request $request): Passport
    {
        $client = $this->clientRegistry->getClient('giltza');
        $accessToken = $this->fetchAccessToken($client);

        return new SelfValidatingPassport(
            new UserBadge($accessToken->getToken(), function() use ($accessToken, $client) {
                $user = $client->fetchUserFromToken($accessToken);
                // 1) have they logged in with Facebook before? Easy!
                $user = $this->entityManager->getRepository(User::class)->findOneBy(['NA' => $user->getId()]);

                if ($user) {
                    return $user;
                }

                throw new UserNotFoundException();
            })
        );
    }
```

KnpUOAuth2ClientBundle-ren konfigurazio fitxategia horrela izan behar du:

```
knpu_oauth2_client:
    clients:
        # configure your clients as described here: https://github.com/knpuniversity/oauth2-client-bundle#configuration
        giltza:
            type: generic
            provider_class: Giltza\OAuth2\Client\Provider\OauthGiltzaProvider
            client_id: "%env(CLIENT_ID)%"
            client_secret: "%env(CLIENT_SECRET)%"
            redirect_route: oauth_check
            redirect_params: { }
            use_state: true
```

Azkenik controller-ean deia egin:

```
    #[Route(path: '/login/giltza/connect', name: 'oauth_connect')]
    public function connect(ClientRegistry $clientRegistry): \Symfony\Component\HttpFoundation\RedirectResponse
    {
        return $clientRegistry->getClient('giltza')->redirect(['urn:izenpe:identity:global urn:izenpe:fea:properties urn:safelayer:eidas:authn_details']);
    }

    #[Route(path: '/login/giltza/connect/check', name: 'oauth_check')]
    public function check(Request $request, ClientRegistry $clientRegistry): void
    {
    }
```

Security.yml horrela dago:

```
    ...
    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false

        main:
            pattern: ^/
            lazy: true
            provider: app_user_provider
            custom_authenticator:
                - App\Security\OauthAuthenticator
            entry_point: App\Security\OauthAuthenticator
            logout:
                path: app_logout
                target: /
                invalidate_session: true

    # Easy way to control access for large sections of your site
    # Note: Only the *first* access control that matches will be used
    access_control:
        - { path: ^/admin/, roles: ROLE_ADMIN }
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1146d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eaa325ea1c7e0d1f663813384a83a71e37fdc9d2594de27406c7a0df86993195?d=identicon)[ikerib](/maintainers/ikerib)

---

Top Contributors

[![ikerib](https://avatars.githubusercontent.com/u/333052?v=4)](https://github.com/ikerib "ikerib (4 commits)")

---

Tags

clientoauthoauth2authorizationgiltzaizenpe

### Embed Badge

![Health badge](/badges/ikerib-giltza-oauth2/health.svg)

```
[![Health](https://phpackages.com/badges/ikerib-giltza-oauth2/health.svg)](https://phpackages.com/packages/ikerib-giltza-oauth2)
```

###  Alternatives

[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[thenetworg/oauth2-azure

Azure Active Directory OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2509.6M48](/packages/thenetworg-oauth2-azure)[stevenmaguire/oauth2-keycloak

Keycloak OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2275.9M27](/packages/stevenmaguire-oauth2-keycloak)[patrickbussmann/oauth2-apple

Sign in with Apple OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1132.5M6](/packages/patrickbussmann-oauth2-apple)[mollie/oauth2-mollie-php

Mollie Provider for OAuth 2.0 Client

251.7M1](/packages/mollie-oauth2-mollie-php)[omines/oauth2-gitlab

GitLab OAuth 2.0 Client Provider for The PHP League OAuth2-Client

36721.5k13](/packages/omines-oauth2-gitlab)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
