Auth and User
Login using JWT authentication.
JWT 인증을 사용하여 로그인합니다.
POST
/
auth
/
jwt
/
login
Login using JWT authentication.
curl --request POST \
--url https://your_a2_service/auth/jwt/login \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'password=<string>' \
--data 'username=<string>' \
--data 'client_id=<string>' \
--data 'client_secret=<string>' \
--data 'grant_type=<string>' \
--data scope=import requests
url = "https://your_a2_service/auth/jwt/login"
payload = {
"password": "<string>",
"username": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"grant_type": "<string>",
"scope": ""
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
password: '<string>',
username: '<string>',
client_id: '<string>',
client_secret: '<string>',
grant_type: '<string>',
scope: ''
})
};
fetch('https://your_a2_service/auth/jwt/login', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your_a2_service/auth/jwt/login",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "password=%3Cstring%3E&username=%3Cstring%3E&client_id=%3Cstring%3E&client_secret=%3Cstring%3E&grant_type=%3Cstring%3E&scope=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your_a2_service/auth/jwt/login"
payload := strings.NewReader("password=%3Cstring%3E&username=%3Cstring%3E&client_id=%3Cstring%3E&client_secret=%3Cstring%3E&grant_type=%3Cstring%3E&scope=")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://your_a2_service/auth/jwt/login")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("password=%3Cstring%3E&username=%3Cstring%3E&client_id=%3Cstring%3E&client_secret=%3Cstring%3E&grant_type=%3Cstring%3E&scope=")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/auth/jwt/login")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "password=%3Cstring%3E&username=%3Cstring%3E&client_id=%3Cstring%3E&client_secret=%3Cstring%3E&grant_type=%3Cstring%3E&scope="
response = http.request(request)
puts response.read_body{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiOTIyMWZmYzktNjQwZi00MzcyLTg2ZDMtY2U2NDJjYmE1NjAzIiwiYXVkIjoiZmFzdGFwaS11c2VyczphdXRoIiwiZXhwIjoxNTcxNTA0MTkzfQ.M10bjOe45I5Ncu_uXvOmVV8QxnL-nZfcH96U90JaocI",
"token_type": "bearer"
}이 페이지가 도움이 되었나요?
⌘I
Login using JWT authentication.
curl --request POST \
--url https://your_a2_service/auth/jwt/login \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'password=<string>' \
--data 'username=<string>' \
--data 'client_id=<string>' \
--data 'client_secret=<string>' \
--data 'grant_type=<string>' \
--data scope=import requests
url = "https://your_a2_service/auth/jwt/login"
payload = {
"password": "<string>",
"username": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"grant_type": "<string>",
"scope": ""
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
password: '<string>',
username: '<string>',
client_id: '<string>',
client_secret: '<string>',
grant_type: '<string>',
scope: ''
})
};
fetch('https://your_a2_service/auth/jwt/login', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your_a2_service/auth/jwt/login",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "password=%3Cstring%3E&username=%3Cstring%3E&client_id=%3Cstring%3E&client_secret=%3Cstring%3E&grant_type=%3Cstring%3E&scope=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your_a2_service/auth/jwt/login"
payload := strings.NewReader("password=%3Cstring%3E&username=%3Cstring%3E&client_id=%3Cstring%3E&client_secret=%3Cstring%3E&grant_type=%3Cstring%3E&scope=")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://your_a2_service/auth/jwt/login")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("password=%3Cstring%3E&username=%3Cstring%3E&client_id=%3Cstring%3E&client_secret=%3Cstring%3E&grant_type=%3Cstring%3E&scope=")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/auth/jwt/login")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "password=%3Cstring%3E&username=%3Cstring%3E&client_id=%3Cstring%3E&client_secret=%3Cstring%3E&grant_type=%3Cstring%3E&scope="
response = http.request(request)
puts response.read_body{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiOTIyMWZmYzktNjQwZi00MzcyLTg2ZDMtY2U2NDJjYmE1NjAzIiwiYXVkIjoiZmFzdGFwaS11c2VyczphdXRoIiwiZXhwIjoxNTcxNTA0MTkzfQ.M10bjOe45I5Ncu_uXvOmVV8QxnL-nZfcH96U90JaocI",
"token_type": "bearer"
}