2020-09-01 20:07:56 +08:00
|
|
|
import { Meteor } from 'meteor/meteor';
|
|
|
|
|
2021-10-20 04:35:39 +08:00
|
|
|
const collectionOptions = Meteor.isClient ? {
|
|
|
|
connection: null,
|
|
|
|
} : {};
|
|
|
|
|
|
|
|
const AuthTokenValidation = new Mongo.Collection('auth-token-validation', collectionOptions);
|
2020-09-01 20:07:56 +08:00
|
|
|
|
|
|
|
if (Meteor.isServer) {
|
2023-02-27 21:46:21 +08:00
|
|
|
AuthTokenValidation._ensureIndex({ connectionId: 1 });
|
2020-09-01 20:07:56 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export const ValidationStates = Object.freeze({
|
|
|
|
NOT_VALIDATED: 1,
|
|
|
|
VALIDATING: 2,
|
|
|
|
VALIDATED: 3,
|
|
|
|
INVALID: 4,
|
|
|
|
});
|
|
|
|
|
|
|
|
export default AuthTokenValidation;
|