Documentation

AuthenticationServiceInterface

The interface for the AuthenticationService.

Table of Contents

checkForOfficeLogin()  : string|bool
Check if a user is logged in via Office.
getAccessToken()  : string
Get the access token for the user.
redirectToAuthorizationUrl()  : mixed
Redirect the user to the correct Microsoft pages for oAuth2.
saveAuthDataFromUrl()  : mixed
Save the auth data from the url parameters in the user session storage.
setAccessToken()  : mixed
Generate and save the accessToken.

Methods

checkForOfficeLogin()

Check if a user is logged in via Office.

public checkForOfficeLogin() : string|bool
Return values
string|bool

The users ID or FALSE if not logged in via Office.

getAccessToken()

Get the access token for the user.

public getAccessToken([bool $login = FALSE ]) : string
Parameters
$login : bool = FALSE

If we want to login the user if there is no token.

Tags
throws
TempStoreException
throws
IdentityProviderException
Return values
string

The access token.

redirectToAuthorizationUrl()

Redirect the user to the correct Microsoft pages for oAuth2.

public redirectToAuthorizationUrl() : mixed
Return values
mixed

saveAuthDataFromUrl()

Save the auth data from the url parameters in the user session storage.

public saveAuthDataFromUrl() : mixed
Tags
throws
TempStoreException
Return values
mixed

setAccessToken()

Generate and save the accessToken.

public setAccessToken(string $code, bool|string $redirect) : mixed
Parameters
$code : string

The code we got from Microsoft.

$redirect : bool|string

Either FALSE or an url where to redirect to.

Tags
throws
TempStoreException
throws
IdentityProviderException
Return values
mixed

Search results