interface AuthenticationServiceInterface

The interface for the AuthenticationService.

Methods

string|bool
checkForOfficeLogin()

Check if a user is logged in via Office.

string|false
getAccessToken(bool $login = FALSE)

Get the access token for the user.

mixed
redirectToAuthorizationUrl(O365ConnectorInterface $o365_connector)

Redirect the user to the correct Microsoft pages for OAuth2.

void
saveAuthDataFromUrl()

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

setAccessToken(string $code, O365ConnectorInterface $o365_connector, string $redirect = '')

Generate and save the access token.

Details

at line 63
string|bool checkForOfficeLogin()

Check if a user is logged in via Office.

Return Value

string|bool

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

at line 48
string|false getAccessToken(bool $login = FALSE)

Get the access token for the user.

Parameters

bool $login

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

Return Value

string|false

The access token or false when no token is provided.

Exceptions

TempStoreException
IdentityProviderException

at line 19
mixed redirectToAuthorizationUrl(O365ConnectorInterface $o365_connector)

Redirect the user to the correct Microsoft pages for OAuth2.

Parameters

O365ConnectorInterface $o365_connector

The o365_connector entity type.

Return Value

mixed

The response, probably a redirect.

at line 55
void saveAuthDataFromUrl()

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

Return Value

void

Exceptions

TempStoreException

at line 34
setAccessToken(string $code, O365ConnectorInterface $o365_connector, string $redirect = '')

Generate and save the access token.

Parameters

string $code

The code we got from Microsoft.

O365ConnectorInterface $o365_connector

The o365_connector entity type.

string $redirect

An url where to redirect to.

Exceptions

TempStoreException
IdentityProviderException