Function OAuthSettings.userAuthUri

User login helper method.

final string userAuthUri (
  scope vibe.http.session.Session httpSession,
  in const(string[string]) extraParams = cast(const(string[string]))null,
  in const(string[]) scopes = null
) @safe immutable;

final string userAuthUri (
  scope vibe.http.session.Session httpSession,
  string[] scopes = null
) @safe immutable;

Use this method to obtain a URI which can be used to redirect the user agent to the login page of the service we want to get access to on behalf of a user.

This URI will contain a dynamically generated state parameter, which should be returned by the service as a query string parameter when the user agent is redirected back to this client. The user session can be started by passing this parameter to the userSession method, along with the authorization code.

Parameters

NameDescription
httpSession The current HTTP session.
extraParams Extra parameters to include in the authentication uri. Use this to pass provider specific parameters that cannot be included in the settings because they won't be the same for every authorization request.
scopes An array of identifiers specifying the scope of access to be requested. (optional)

Returns

The URI the user agent should be redirected to for login and authorization.