mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-10 22:53:42 +00:00
16 lines
454 B
TypeScript
16 lines
454 B
TypeScript
import { login, User } from 'support/login/users'
|
|
|
|
export interface apiCallProperties {
|
|
authHeader: string
|
|
mgntBaseURL: string
|
|
}
|
|
|
|
export function apiAuth(): Cypress.Chainable<apiCallProperties> {
|
|
return login(User.IAMAdminUser, 'Password1!', false, true).then(token => {
|
|
return <apiCallProperties>{
|
|
authHeader: `Bearer ${token}`,
|
|
mgntBaseURL: `${Cypress.env("BACKEND_URL")}/management/v1/`,
|
|
}
|
|
})
|
|
}
|