Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module TicketMaster::Provider
- # This is the Yoursystem Provider for ticketmaster
- module Redmine
- include TicketMaster::Provider::Base
- PROJECT_API = RedmineAPI::Project
- # This is for cases when you want to instantiate using TicketMaster::Provider::Yoursystem.new(auth)
- def self.new(auth = {})
- TicketMaster.new(:redmine, auth)
- end
- # declare needed overloaded methods here
- def authorize(auth = {})
- @authentication ||= TicketMaster::Authenticator.new(auth)
- auth = @authentication
- if (auth.server.blank? and auth.username.blank? and auth.password.blank?)
- raise "Please you should provide server, username and password"
- end
- RedmineAPI.authenticate(auth.server, auth.username, auth.password)
- end
- end
- end
Add Comment
Please, Sign In to add comment