2 ========================LICENSE_START=================================
5 Copyright (C) 2023: Nordix Foundation
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 ========================LICENSE_END===================================
26 <div class="p-5 mb-4 bg-light rounded-3">
27 <div class="container-fluid py-5">
28 <h4 class="card-subtitle mb-3 text-body-secondary">Response from CAPIF core</h4>
29 <div class="callout callout-info">
30 <h5 class="card-subtitle mb-3 text-body-secondary">Access Token Response</h5>
31 <div id="response" class="text-truncate">
34 <small id="accessToken" class="text-muted"></small>
38 <small id="expiresIn" class="text-muted"></small>
42 <small id="scope" class="text-muted"></small>
46 <small id="tokenType" class="text-muted"></small>
51 <div class="btns col-md-12 text-center">
52 <form action="/" method="GET">
53 <input class="btn btn-secondary" formaction="/" type="submit" value="Return to main page">
59 var htmlResponse = "{{.response}}"
60 const strData = JSON.parse(htmlResponse);
61 document.getElementById("accessToken").innerHTML = strData.access_token;
62 document.getElementById("expiresIn").innerHTML = strData.expires_in;
63 document.getElementById("scope").innerHTML = strData.scope;
64 document.getElementById("tokenType").innerHTML = strData.token_type;
67 <div class="p-5 mb-4 bg-light rounded-3">
68 <div class="container-fluid py-5">
70 <div class="alert alert-danger" role="alert">
74 <h5 class="card-subtitle mb-3 text-body-secondary">CAPIF_Security_API > Obtain_Authorization</h5>
75 <form action="/gettoken" method="POST">
77 <label for="securityId" class="form-label">Security Id:</label>
78 <input type="text" class="form-control" id="securityId" name="securityId" placeholder="securityId" required>
81 <label for="clientId" class="form-label">Client Id:</label>
82 <input type="text" class="form-control" id="clientId" name="clientId" placeholder="clientId" required>
85 <label for="clientSecret" class="form-label">Client Secret:</label>
86 <input type="text" class="form-control" id="clientSecret" name="clientSecret" placeholder="clientSecret" >
89 <label for="scope" class="form-label">Scope:</label>
90 <input type="text" class="form-control" id="scope" name="scope" placeholder="scope" >
92 <div class="btns col-md-12 text-center">
93 <input class="btn btn-primary" type="submit" value="Submit">
94 <input class="btn btn-secondary" formaction="/" type="submit" value="Cancel" formnovalidate>