Skip to content
Discussion options

You must be logged in to vote

My first attempt to create a LdapProvider is to create this class inside providers folder. I'm trying to do a a simple test but i have so many questions.
How can i define the typings of my LdapProvider?
Where should i define a custom User interface for my LdapProvider?

This is the correct way to extend the auth(inside AppProviders)?

  public async register() {
    const LdapProvider = await import('./LdapProvider')
    const auth = this.app.container.use('Adonis/Addons/Auth')

    auth.extend('provider', 'ldap', (auth, mapping, config) => {
      console.log("hey",auth, mapping, config )
      return new LdapProvider();
    })
  }
export default class LdapProvider<User> implements UserPro…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@thetutlage
Comment options

@guntribam
Comment options

@phatmann
Comment options

@kumaxim
Comment options

Answer selected by guntribam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants