Docker: fix api variables names
This commit is contained in:
parent
bd44122f4e
commit
9f51001a50
@ -23,18 +23,18 @@ export class AuthService {
|
||||
|
||||
const user = {
|
||||
username,
|
||||
domain: process.env.domain,
|
||||
domain: process.env.LDAP_DOMAIN,
|
||||
displayName,
|
||||
department,
|
||||
position: title,
|
||||
mail,
|
||||
domainName: `${process.env.domain}\\${username}`,
|
||||
domainName: `${process.env.LDAP_DOMAIN}\\${username}`,
|
||||
};
|
||||
await this.usersCache.addUser(username, user);
|
||||
|
||||
const payload: TokenPayload = {
|
||||
username,
|
||||
domain: process.env.domain,
|
||||
domain: process.env.LDAP_DOMAIN,
|
||||
};
|
||||
|
||||
return this.jwtService.sign(payload);
|
||||
|
||||
@ -8,12 +8,12 @@ export class LdapService {
|
||||
async authenticate(login: string, password?: string) {
|
||||
const options: AuthenticationOptions = {
|
||||
ldapOpts: {
|
||||
url: process.env.ldapUrl,
|
||||
url: process.env.LDAP_URL,
|
||||
},
|
||||
adminDn: process.env.bindDN,
|
||||
adminPassword: process.env.bindCredentials,
|
||||
userSearchBase: process.env.base,
|
||||
usernameAttribute: process.env.attribute,
|
||||
adminDn: process.env.LDAP_BIND_DN,
|
||||
adminPassword: process.env.LDAP_BIND_CREDENTIALS,
|
||||
userSearchBase: process.env.LDAP_BASE,
|
||||
usernameAttribute: process.env.LDAP_ATTRIBUTE,
|
||||
username: login,
|
||||
userPassword: password,
|
||||
verifyUserExists: password === undefined,
|
||||
|
||||
@ -17,12 +17,12 @@ services:
|
||||
context: .
|
||||
dockerfile: ./apps/api/Dockerfile
|
||||
environment:
|
||||
- bindDN=${LDAP_BIND_DN}
|
||||
- bindCredentials=${LDAP_BIND_CREDENTIALS}
|
||||
- domain=${LDAP_DOMAIN}
|
||||
- ldapUrl=${LDAP_URL}
|
||||
- base=${LDAP_BASE}
|
||||
- attribute=${LDAP_ATTRIBUTE}
|
||||
- LDAP_BIND_DN=${LDAP_BIND_DN}
|
||||
- LDAP_BIND_CREDENTIALS=${LDAP_BIND_CREDENTIALS}
|
||||
- LDAP_DOMAIN=${LDAP_DOMAIN}
|
||||
- LDAP_URL=${LDAP_URL}
|
||||
- LDAP_BASE=${LDAP_BASE}
|
||||
- LDAP_ATTRIBUTE=${LDAP_ATTRIBUTE}
|
||||
- SECRET=${API_SECRET}
|
||||
- TOKEN_TTL=${API_TOKEN_TTL}
|
||||
- CACHE_TTL=${API_CACHE_TTL}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user