[[authRepository]]
= authRepository
:author: Daniel Wisnewski <daniel.wisnewski@tigase.net>
:version: v1.0, June 2017: Reformatted for Kernel/DSL

*Description:* Container specifying authentication repository. This container replaces the old `auth-db` property types, and may contain some other configuration values.

*Default value:*
[source,dsl]
-----
authRepository {
  <configuration>
}
-----
This is the basic setup for authRepository, where <configuration> settings are global for all authentication databases.
However, you may configure multiple databases individually.

*Example:*
[source,dsl]
-----
authRepository {
    'auth-repo-pool-size' = 50
    domain1.com () {
        cls = 'tigase.db.jdbc.JDBCRepository'
        'data-source' = 'domain1'
    }
    domain2.com () {
        cls = 'tigase.db.jdbc.JDBCRepository'
        'data-source' = 'domain2'
        'auth-repo-pool-size' = 30
    }
}
-----

== *Configuration Values:*
Container has the following options


[[authRepoPoolSize]]
=== pool-size
This property sets the database connections pool size for the associated `UserRepository`.

NOTE: in some cases instead of default for this property setting for xref:dataRepoPoolSize[`data-repo-pool-size`] is used if pool-size is not defined in `userRepository`. This depends on the repository implementation and the way it is initialized.

[source,dsl]
-----
authRepository {
    default ()
      'pool-size' = 10
}
-----

This is a global property that may be overridden by individual repository settings:

[source,dsl]
-----
userRepository {
    default () {
      'pool-size' = 10
    }
    special-repo () {
      'pool-size' = 30
    }
}
-----

[[authRepoPool]]
=== *cls*
Defines the class used for repository connection. You can use this to specify specific drivers for different DB types. +

Unless specified, the pool class will use the one included with Tigase. You may configure individual repositories in the same way.
This replaces the former `--auth-repo-pool` property.

NOTE: File conversion will not remove and convert this property, it *MUST BE DONE MANUALLY*.

*Available since:* 8.0.0
