Download the PHP package gecka/socialite-ncconnect without Composer

On this page you can find all versions of the php package gecka/socialite-ncconnect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package socialite-ncconnect

NcConnect

CI PHP Laravel Socialite

NC Connect OAuth2 Provider for Laravel Socialite.

About

NcConnect is a Laravel Socialite provider for NC Connect, the authentication platform of the Government of New Caledonia. It implements the OpenID Connect protocol over the NC Connect V3 (Keycloak) infrastructure.

Features

Requirements

Installation

Configuration

Add to config/services.php:

Register the provider

Laravel 11+ — in app/Providers/AppServiceProvider.php:

Laravel 10 — in app/Providers/EventServiceProvider.php:

Usage

Authentication

Refreshing tokens

Access tokens expire after 30 minutes in V3. Use the built-in refreshToken() method:

Logout

The generateLogoutURL() method builds an RP-Initiated Logout URL.

The id_token_hint is available on the User object after authentication:

User object

The returned User object extends the Socialite base user with typed accessors for NC Connect claims:

Accessor Return type Description
$user->id string Unique identifier (sub)
$user->email ?string Email address
$user->isEmailVerified() bool Whether the email is verified
$user->getVerifiedLevel() int Verification level (0 = unverified, 1 = declarative, 2 = digital)
$user->getPreferredUsername() string Display name
$user->getGivenName() string All given names
$user->getFirstName() string First given name only
$user->getFamilyName() string Family name
$user->getBirthdate() string Date of birth (YYYY-MM-DD)
$user->getGender() string Gender (male/female)
$user->getBirthplace() string Place of birth
$user->tokenId ?string ID token hint (for logout)
$user->token string Access token
$user->refreshToken ?string Refresh token
$user->expiresIn int Token expiry in seconds

All attributes are also accessible via $user->getRaw() for the full userinfo response.

Scopes

Default: openid, identite_pivot, profile, email

Available: openid, profile, email, birth, identite_pivot

Authentication methods

Method Config value Description
Client Secret Basic client_secret_basic (default) Credentials sent as Basic auth header
Client Secret Post client_secret_post Credentials sent in POST body

Configuration reference

Env variable Description Default
NCCONNECT_CLIENT_ID OAuth2 client ID
NCCONNECT_CLIENT_SECRET OAuth2 client secret
NCCONNECT_REDIRECT_URI Callback URL after login
NCCONNECT_LOGOUT_REDIRECT Redirect URL after logout
NCCONNECT_FORCE_DEV Force dev endpoints in production
NCCONNECT_AUTH_METHOD Authentication method client_secret_basic

Upgrading

Migrating from NC Connect V2 to V3 (Keycloak)? See UPGRADE.md.

License

This project is released under the MIT License.

Authors


Built with 🥥 and ☕ by Gecka — Kanaky-New Caledonia 🇳🇨


All versions of socialite-ncconnect with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
socialiteproviders/manager Version ^4.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gecka/socialite-ncconnect contains the following files

Loading the files please wait ...