class OAuth2::Strategy::Assertion

The Client Assertion Strategy

@see datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-10#section-4.1.3

Sample usage:

client = OAuth2::Client.new(client_id, client_secret,
                            :site => 'http://localhost:8080',
                            :auth_scheme => :request_body)

claim_set = {
  :iss => "http://localhost:3001",
  :aud => "http://localhost:8080/oauth2/token",
  :sub => "me@example.com",
  :exp => Time.now.utc.to_i + 3600,
}

encoding = {
  :algorithm => 'HS256',
  :key => 'secret_key',
}

access = client.assertion.get_token(claim_set, encoding)
access.token                 # actual access_token string
access.get("/api/stuff")     # making api calls with access token in header