Interface MongodbModelAuthProviderContract<User>

interface MongodbModelAuthProviderContract {
    findById(id): Promise<ProviderUserContract<InstanceType<User>>>;
    findByRememberMeToken(userId, token): Promise<ProviderUserContract<InstanceType<User>>>;
    findByUid(uid): Promise<ProviderUserContract<InstanceType<User>>>;
    getUserFor(user): Promise<ProviderUserContract<InstanceType<User>>>;
    updateRememberMeToken(authenticatable): Promise<void>;
}

Type Parameters

Hierarchy

  • UserProviderContract<InstanceType<User>>
    • MongodbModelAuthProviderContract

Methods

  • Find a user using the primary key value

    Parameters

    • id: string | number

    Returns Promise<ProviderUserContract<InstanceType<User>>>

  • Find a user using the remember me token

    Parameters

    • userId: string | number
    • token: string

    Returns Promise<ProviderUserContract<InstanceType<User>>>

  • Find a user by searching for their uids

    Parameters

    • uid: string

    Returns Promise<ProviderUserContract<InstanceType<User>>>

  • Return an instance of the user wrapped inside the Provider user contract

    Parameters

    • user: InstanceType<User>

    Returns Promise<ProviderUserContract<InstanceType<User>>>

  • Update remember token

    Parameters

    • authenticatable: ProviderUserContract<InstanceType<User>>

    Returns Promise<void>