mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 11:06:49 +00:00
Tweaks for Direct Login glossary item
This commit is contained in:
parent
fdfaad1bb2
commit
6f9ad08d10
@ -15,6 +15,11 @@ Please reference Issue Numbers in your commits.
|
||||
|
||||
Please comment your code ! :-) Imagine an engineer is trying to fix a production issue: she is working on a tiny screen, via a dodgy mobile Internet connection, in a sandstorm - Your code is fresh in your mind. Your comments could help her!
|
||||
|
||||
## Code style
|
||||
|
||||
When naming variables use strict camel case e.g. use myUrl not myURL. This is so we can automatically convert from camelCase to snake_case for JSON output.
|
||||
|
||||
|
||||
## Issues
|
||||
|
||||
If would like to report an issue or suggest any kind of improvement please use Github Issues.
|
||||
|
||||
@ -432,6 +432,6 @@ display_internal_errors=false
|
||||
# oauth2.jwk_set.url=http://localhost:8080/openid-connect-server-webapp/jwk.json
|
||||
# ----------------------------------------------------------- OAuth 2 -----------
|
||||
|
||||
## This property is used for documenting at Resource Doc
|
||||
## This property is used for documenting at Resource Doc. It may include the port also (but not /obp)
|
||||
## (this needs to be a URL)
|
||||
documented_root_url=https://openbankproject.com
|
||||
documented_server_url=https://apisandbox.openbankproject.com
|
||||
@ -1242,6 +1242,8 @@ object APIUtil extends MdcLoggable {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
glossaryItems += GlossaryItem(
|
||||
title = "Account",
|
||||
description =
|
||||
@ -1365,7 +1367,7 @@ object APIUtil extends MdcLoggable {
|
||||
glossaryItems += GlossaryItem(
|
||||
title = "Direct Login",
|
||||
description =
|
||||
"""
|
||||
s"""
|
||||
|## TL;DR
|
||||
|
|
||||
|Direct Login is a simple authentication process to be used at hackathons and trusted environments:
|
||||
@ -1373,7 +1375,10 @@ object APIUtil extends MdcLoggable {
|
||||
|
|
||||
|### 1) Get your App key
|
||||
|
|
||||
|On the OBP API portal click the **Get App Key** button. You may need to register/login first.
|
||||
|[Sign up]($getServerUrl/user_mgt/sign_up) or [login]($getServerUrl/user_mgt/login) as a developer.
|
||||
|
|
||||
|Register your App key [HERE]($getServerUrl/consumer-registration)
|
||||
|
|
||||
|Copy and paste the consumer key for step two below.
|
||||
|
|
||||
|### 2) Authenticate
|
||||
@ -1381,7 +1386,7 @@ object APIUtil extends MdcLoggable {
|
||||
|
|
||||
|Using your favorite http client:
|
||||
|
|
||||
| POST OBP-HOST/my/logins/direct
|
||||
| POST $getServerUrl/my/logins/direct
|
||||
|
|
||||
|Body
|
||||
|
|
||||
@ -1399,10 +1404,9 @@ object APIUtil extends MdcLoggable {
|
||||
|
|
||||
|Here is it all together:
|
||||
|
|
||||
| POST /my/logins/direct HTTP/1.1
|
||||
| POST $getServerUrl/my/logins/direct HTTP/1.1
|
||||
| Authorization: DirectLogin username="janeburel", password="686876", consumer_key="GET-YOUR-OWN-API-KEY-FROM-THE-OBP"
|
||||
| Content-Type: application/json
|
||||
| Cookie: JSESSIONID=7h1ssu6d7j151u08p37a6tsx1
|
||||
| Host: 127.0.0.1:8080
|
||||
| Connection: close
|
||||
| User-Agent: Paw/2.3.3 (Macintosh; OS X/10.11.3) GCDHTTPRequest
|
||||
@ -1424,7 +1428,7 @@ object APIUtil extends MdcLoggable {
|
||||
|
|
||||
|Action:
|
||||
|
|
||||
| PUT /obp/v2.0.0/banks/obp-bankx-n/accounts/my-new-account-id
|
||||
| PUT $getObpApiRoot/v2.0.0/banks/obp-bankx-n/accounts/my-new-account-id
|
||||
|
|
||||
|Body:
|
||||
|
|
||||
@ -1438,7 +1442,7 @@ object APIUtil extends MdcLoggable {
|
||||
|
|
||||
|Here is another example:
|
||||
|
|
||||
| PUT /obp/v2.0.0/banks/enbd-egy--p3/accounts/newaccount1 HTTP/1.1
|
||||
| PUT $getObpApiRoot/v2.0.0/banks/enbd-egy--p3/accounts/newaccount1 HTTP/1.1
|
||||
| Authorization: DirectLogin token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyIiOiIifQ.C8hJZNPDI59OOu78pYs4BWp0YY_21C6r4A9VbgfZLMA"
|
||||
| Content-Type: application/json
|
||||
| Cookie: JSESSIONID=7h1ssu6d7j151u08p37a6tsx1
|
||||
@ -1463,7 +1467,7 @@ object APIUtil extends MdcLoggable {
|
||||
|
|
||||
| consumer_key
|
||||
| The application identifier. Generated on OBP side via
|
||||
| /consumer-registration endpoint.
|
||||
| $getServerUrl/consumer-registration endpoint.
|
||||
|
|
||||
|
|
||||
| Each parameter MUST NOT appear more than once per request.
|
||||
@ -2498,10 +2502,12 @@ Versions are groups of endpoints in a file
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to get property which is used for documenting at Resource Doc
|
||||
* @return Value of property documented_root_url
|
||||
* This value is used to construct some urls in Resource Docs
|
||||
* Its the root of the server as opposed to the root of the api
|
||||
*/
|
||||
def getDocumentedRootUrl: String = getPropsValue("documented_root_url").openOr(MissingPropsValueAtThisInstance + "documented_root_url")
|
||||
def getServerUrl: String = getPropsValue("documented_server_url").openOr(MissingPropsValueAtThisInstance + "documented_server_url")
|
||||
|
||||
// All OBP REST end points start with /obp
|
||||
def getObpApiRoot: String = s"$getServerUrl/obp"
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user