require 'token_endpoint'
Rails.application.routes.draw do |map|
  namespace 'oauth2' do
    resources :authorizations, :only => :create
  end
  match 'oauth2/authorize', :to => 'oauth2/authorizations#new'
  post 'oauth2/token', :to => proc { |env| TokenEndpoint.new.call(env) }
end

require 'token_endpoint'
Rails.application.routes.draw do |map|
  namespace 'oauth2' do
    resources :authorizations, :only => :create
  end

  match 'oauth2/authorize' => 'oauth2/authorizations#new'
  post 'oauth2/token' => TokenEndpoint.new
end

Use latest Rails 3 router syntax
Use latest Rails 3 router syntax

I'm assuming TokenEndpoint.new responds to `#call` and returns something like `[status, headers, body]`. If not the lambda may still be required. The `:to => path` is not however.