Class MongoRealmAuthenticator

    • Constructor Detail

      • MongoRealmAuthenticator

        public MongoRealmAuthenticator()
    • Method Detail

      • setMongoClient

        public void setMongoClient​(com.mongodb.MongoClient mclient)
      • verify

        public io.undertow.security.idm.Account verify​(io.undertow.security.idm.Account account)
        Specified by:
        verify in interface Authenticator
        Specified by:
        verify in interface io.undertow.security.idm.IdentityManager
      • verify

        public io.undertow.security.idm.Account verify​(String id,
                                                       io.undertow.security.idm.Credential credential)
        Specified by:
        verify in interface Authenticator
        Specified by:
        verify in interface io.undertow.security.idm.IdentityManager
      • getBcryptComplexity

        public Integer getBcryptComplexity()
        Returns:
        the bcryptComplexity
      • isBcryptHashedPassword

        public boolean isBcryptHashedPassword()
      • verify

        public io.undertow.security.idm.Account verify​(io.undertow.security.idm.Credential credential)
        Specified by:
        verify in interface Authenticator
        Specified by:
        verify in interface io.undertow.security.idm.IdentityManager
      • accountIdTrasformer

        protected String accountIdTrasformer​(String id)
        Override this method to trasform the account id. By default it returns the id without any transformation. For example, it could be overridden to force the id to be lowercase.
        Parameters:
        id - the account id
        Returns:
        the trasformed account Id (default is identity)
      • getPropPassword

        public String getPropPassword()
        Returns:
        the propPassword
      • getXForwardedHeaderName

        public static io.undertow.util.HttpString getXForwardedHeaderName​(String suffix)
      • getXForwardedAccountIdHeaderName

        public static io.undertow.util.HttpString getXForwardedAccountIdHeaderName()
      • getXForwardedRolesHeaderName

        public static io.undertow.util.HttpString getXForwardedRolesHeaderName()
      • checkUserCollection

        public boolean checkUserCollection()
      • countAccounts

        public long countAccounts()
      • createDefaultAccount

        public void createDefaultAccount()
      • getUsersDb

        public String getUsersDb()
        Returns:
        the usersDb
      • setUsersDb

        public void setUsersDb​(String usersDb)
        Parameters:
        usersDb - the usersDb to set
      • getUsersCollection

        public String getUsersCollection()
        Returns:
        the usersCollection