créer collection bruno pour test d'api
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
meta {
|
||||
name: Get Token
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{keycloakUrl}}/protocol/openid-connect/token
|
||||
body: formUrlEncoded
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:form-urlencoded {
|
||||
grant_type: password
|
||||
client_id: {{clientId}}
|
||||
username: {{username}}
|
||||
password: {{password}}
|
||||
}
|
||||
|
||||
script:post-response {
|
||||
if (res.status === 200) {
|
||||
bru.setEnvVar("accessToken", res.body.access_token);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user