code: func InitModels() {
  	index := mgo.Index{
  		Key:    []string{"authorizationcode"},
  		Unique: true,
  	} //Do not drop duplicates since it would hijack another authorizationrequest, better to error out
  
  	db.EnsureIndex(requestsCollectionName, index)
  
  	//TODO: unique username/clientid combination
  
  	automaticExpiration := mgo.Index{
  		Key:         []string{"createdat"},
  		ExpireAfter: time.Second * 10,
  		Background:  true,
  	}
  	db.EnsureIndex(requestsCollectionName, automaticExpiration)
  
  	index = mgo.Index{
  		Key:    []string{"accesstoken"},
  		Unique: true,
  	} //Do not drop duplicates since it would hijack another authorizationrequest, better to error out
  
  	db.EnsureIndex(tokensCollectionName, index)
  
  	//TODO: unique username/clientid combination
  
  	automaticExpiration = mgo.Index{
  		Key:         []string{"createdat"},
  		ExpireAfter: AccessTokenExpiration,
  		Background:  true,
  	}
  	db.EnsureIndex(tokensCollectionName, automaticExpiration)
  
  	index = mgo.Index{
  		Key:    []string{"clientid", "label"},
  		Unique: true,
  	}
  	db.EnsureIndex(clientsCollectionName, index)
  
  	index = mgo.Index{
  		Key:    []string{"refreshtoken"},
  		Unique: true,
  	} //Do not drop duplicates since it would hijack another refreshtoken, better to error out
  
  	db.EnsureIndex(refreshTokenCollectionName, index)
  	automaticExpiration = mgo.Index{
  		Key:         []string{"lastused"},
  		ExpireAfter: time.Second * 86400 * 30,
  		Background:  true,
  	}
  	db.EnsureIndex(refreshTokenCollectionName, automaticExpiration)
  
  }
docs: //InitModels initialize models in mongo, if required.