OAuthSettings.userSession

Start a session on behalf of the resource owner, using _username and _password for authentication.

This authentication flow SHOULD be used only as a last resort, as it requires exposal of the plain _username and _password to the client.

  1. OAuthSession userSession(Session httpSession, string state, string authorizationCode)
  2. OAuthSession userSession(string username, string password, string[] scopes)
    class OAuthSettings
    final immutable
    userSession
    (
    string username
    ,
    string password
    ,
    string[] scopes
    )
    out (result) { assert (result !is null); }

Parameters

username string

The resource owner's _username.

password string

The resource owner's _password.

scopes string[]

An array of strings representing the scope of the authorization request. (may be null)

Throws

OAuthException if user authentication fails or the client could not be granted access on behalf of the resource owner for any scope requested.

Meta