We offer some enhanced functionality for those who require more advanced features.
Some websites require functionality beyond that which BidJS requires.
In order to help support this, we expose many of the events which happen within BidJS, so that third party developers can react to them.
We provide a
callback option within the BidJS configuration. This can be overwritten with your own functionality
We have a standardised format for all events, so you can write your own functionality to handle multiple types of event.
Your callback method will always be called with an event in the following format
There are numerous events that are broadcast.
BIDJS_MODULES_INITIALISED- BidJS Scripts first begin running
BIDJS_MODULES_LOADED- BidJS has finished loading
BIDJS_MODULES_NAVIGATED- The user has changed page on BidJS
BIDJS_UNAUTHENTICATED- The user login state has changed
AUCTION_SUBSCRIBED- The user is receiving live updates for an auction
BID_REINSTATED- Informs of a change in the bid, or a new bid for a listing
REGISTRANT_UPDATED- Registration state has changed for a user
SALE_WITHDRAWN- A listing has been added or removed on the Auction
SALE_STARTED- An item has been completed (sold, passed etc), or been started (re-listed, re-offered etc)
SALE_NEXT_BID_SET- The increment or next bid value of a listing has changed
SALE_UNIT_BIDDING_TYPE_SET- Advises of a change in how the units for a listing are being priced
WEBCAST_FEED_SET- The webcast video / audio feed has changed properties
WEBCAST_INPLAY_SET- The webcast inplay lot has changed
WEBCAST_INPLAY_STATE_SET- The webcast has been paused / resumed
WEBCAST_INPLAY_WARNING- The sale warning for inplay item has updated
WEBCAST_MESSAGE_SET- A webcast message has changed
We support the usage of other OAuth servers, in the case of you having your own existing authentication.
- You have your OAuth server set-up
- The OAuth server authenticates the user onto the same domain as the website on which BidJS is located
- The Authentication token is published as either a cookie or localStorage item onto the client browser
- If using a cookie, the cookie domain and path should allow access on the domain on which BidJS is located
- The OAuth server has an endpoint to return a user based on the token (commonly referred to as a
The user endpoint should return the following information, in order to ensure your users don't need to supply this upon logging in.
- Email address
- Address Line 1
- Tel (Daytime)
Additionally, we accept the following information, which will be inserted into the user account if supplied
- Company Name
- Address Line 2
- Contact firstname.lastname@example.org, supplying us with the information above. We will then update this on your account.
- Add the OAuth options to your BidJS configuration, as below
false, then we assume your OAuth credentials are stored as a cookie.
tokenName is either the name of the cookie, or the localStorage item.
BidJS is currently in the process of moving to "Modules". This means we give you the ability to utilise the parts of the application that you need, and to turn off parts which you don't. This results in a more tailored, better user experience for your customers.
As covered in the installation guide, the current modules definition is as follows:
In most cases, it's safe to leave this definition as-is. However, if you know you will never use (for example) the invoicing part of our application, it's safe to disable this. This will prevent other parts of the application sending users to the invoicing module.
You are also able to set a module as the default module to load on a page, instead of the home.
This might be useful if you wanted to display one module on another completely independent page on your site.
The below example would show the
auctionsArchived module only, on this page.
By adjusting the URLs of the
auctionDetails to point to the page on the site where the other modules are, it ensures that you're still able to link through to view the auction.
There may also be cases where you wish to have the BidJS installation running, but hidden. This may be desirable if you still want to show the navigation statuses on other pages of your site without auctions.
To do this, you can disable all the modules, and set the defaultModule