Zitadel PHP Client 1.3.6
PHP Client for Zitadel
Loading...
Searching...
No Matches
IDP Class Reference

Public Member Functions

 __construct (array $settings)
 
 setUserId (int $userid)
 
 setIdpId (string $idpId)
 
 setIdpUserId (string $idpUserId)
 
 setIdpIntentId (string $idpIntentId)
 
 setIdpToken (string $idpToken)
 
 setSuccessUrl (string $successUrl)
 
 setFailureUrl (string $failureUrl)
 
 getAuthUrl ()
 
 getAccessToken ()
 
 getIdpUserId ()
 
 getIdpUserName ()
 
 getIdpRawInformation ()
 
 getIdpEmail ()
 
 isIdpEmailVerified ()
 
 getIdpPicture ()
 
 getIdpProfile ()
 
 startFlow ()
 
 fetchIdpData ()
 
 linkIdpToUser ()
 

Detailed Description

Class for working with external Identity Providers.

Definition at line 10 of file IDP.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( array $settings)

Initialize the IDP setup

Parameters
$settingsarray The settings array

Definition at line 32 of file IDP.php.

Member Function Documentation

◆ fetchIdpData()

fetchIdpData ( )

Fetch the data from the IDP.

Returns
void
Exceptions
Exception

Definition at line 199 of file IDP.php.

◆ getAccessToken()

getAccessToken ( )

Get the OAuth-Access Token from the IDP

Returns
string OAuth-Access Token

Definition at line 102 of file IDP.php.

◆ getAuthUrl()

getAuthUrl ( )

Get the Auth-URL to start the login flow with the external IDP

Returns
string AuthURL.

Definition at line 95 of file IDP.php.

◆ getIdpEmail()

getIdpEmail ( )

Get the Email address from the IDP

Returns
string Email address

Definition at line 130 of file IDP.php.

◆ getIdpPicture()

getIdpPicture ( )

Get the profile picture from the IDP

Returns
string Profile picture URL

Definition at line 144 of file IDP.php.

◆ getIdpProfile()

getIdpProfile ( )

Get the profile URL from the IDP

Returns
string Profile URL

Definition at line 151 of file IDP.php.

◆ getIdpRawInformation()

getIdpRawInformation ( )

Get the raw user data from the IDP

Returns
string JSON string with the raw user data

Definition at line 123 of file IDP.php.

◆ getIdpUserId()

getIdpUserId ( )

Get the User-ID from the IDP

Returns
string User-ID

Definition at line 109 of file IDP.php.

◆ getIdpUserName()

getIdpUserName ( )

Get the Username from the IDP

Returns
string Username

Definition at line 116 of file IDP.php.

◆ isIdpEmailVerified()

isIdpEmailVerified ( )

Returns true, when the Email address from the IDP is verified.

Returns
bool Is the Email address verified

Definition at line 137 of file IDP.php.

◆ linkIdpToUser()

linkIdpToUser ( )

Link the IDP with a user account, so the user can sign in through the IDP

Returns
void
Exceptions
Exception

Definition at line 241 of file IDP.php.

◆ setFailureUrl()

setFailureUrl ( string $failureUrl)

Set the failure URL. After the OAuth-Flow, the user will be redirected to it, if the login was successful.

Parameters
string$failureUrlFailure URL
Returns
void

Definition at line 88 of file IDP.php.

◆ setIdpId()

setIdpId ( string $idpId)

Set the id of the Identity Provider.

Parameters
string$idpIdID of the Identity Provider
Returns
void

Definition at line 48 of file IDP.php.

◆ setIdpIntentId()

setIdpIntentId ( string $idpIntentId)

Set the IDP Intent ID

Parameters
string$idpIntentIdIDP Intent ID. Zitadel sends it in the GET-Parameter "id" to the success URL
Returns
void

Definition at line 64 of file IDP.php.

◆ setIdpToken()

setIdpToken ( string $idpToken)

Set the IDP Token

Parameters
string$idpTokenIDP Token. Zitadel sends it in the GET-Parameter "token" to the success URL
Returns
void

Definition at line 72 of file IDP.php.

◆ setIdpUserId()

setIdpUserId ( string $idpUserId)

Set the User-ID for the IDP-Account

Parameters
string$idpUserIdUser-ID for the IDP-Account
Returns
void

Definition at line 56 of file IDP.php.

◆ setSuccessUrl()

setSuccessUrl ( string $successUrl)

Set the success URL. After the OAuth-Flow, the user will be redirected to it, if the login was successful.

Parameters
string$successUrlSuccess-URL
Returns
void

Definition at line 80 of file IDP.php.

◆ setUserId()

setUserId ( int $userid)

Set the userid

Parameters
$useridint User id
Returns
void

Definition at line 40 of file IDP.php.

◆ startFlow()

startFlow ( )

Start the OAuth Flow. If the request is successful, the user will be redirected to the success URL with the GET Parameters id(IDP-Intent-ID) and token(IDP-Token)

Returns
void
Exceptions
Exception

Definition at line 159 of file IDP.php.


The documentation for this class was generated from the following file: