class ADAL::UserAssertion

An assertion and its representation type, stored as a JWT for the on-behalf-of flow.

Attributes

assertion[R]
assertion_type[R]

Public Class Methods

new( assertion, assertion_type = ADAL::TokenRequest::GrantType::JWT_BEARER) click to toggle source

Creates a new UserAssertion.

@param String assertion

An OAuth assertion representing the user.

@optional AssertionType assertion_type

The type of the assertion being made. Currently only JWT_BEARER is
supported.
# File lib/adal/user_assertion.rb, line 40
def initialize(
  assertion, assertion_type = ADAL::TokenRequest::GrantType::JWT_BEARER)
  @assertion = assertion
  @assertion_type = assertion_type
end

Public Instance Methods

request_params() click to toggle source

The relevant OAuth access token request parameters for this object.

@return Hash

# File lib/adal/user_assertion.rb, line 50
def request_params
  { grant_type: assertion_type,
    assertion: assertion,
    requested_token_use: :on_behalf_of,
    scope: :openid }
end