Sha256: ffb28af7de47c73832025903898216bbd20e4ddc1f54ff274502bb4fafaf8a01

Contents?: true

Size: 485 Bytes

Versions: 21

Compression:

Stored size: 485 Bytes

Contents

require 'rack/oauth2'

client = Rack::OAuth2::Client.new(
  identifier:             client_id,
  secret:                 secret,
  state:                  'some_state',
  redirect_uri:           redirect_url,
  authorization_endpoint: 'https://www.mollie.com/oauth2/authorize',
  token_endpoint:         'https://api.mollie.com/oauth2/tokens'
)

# Use the code returned as parameter on the redirect endpoint
client.authorization_code = params['code']
client.access_token!.access_token

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
mollie-api-ruby-4.0.0.pre.alpha.1 examples/connect/tokens.rb