Added endpoint getServerJWK - docs

This commit is contained in:
Marko Milić 2019-03-16 10:34:53 +01:00
parent a3250eaecb
commit 6f03f1d2ce
4 changed files with 15 additions and 7 deletions

View File

@ -3164,6 +3164,13 @@ object SwaggerDefinitionsJSON {
val meetingsJsonV310 = MeetingsJsonV310(List(meetingJsonV310))
case class SeverJWK(kty: String = "RSA",
e: String = "AQAB",
use: String = "sig",
kid: String = "fr6-BxXH5gikFeZ2O6rGk0LUmJpukeswASN_TMW8U_s",
n: String = "hrB0OWqg6AeNU3WCnhheG18R5EbQtdNYGOaSeylTjkj2lZr0_vkhNVYvase-CroxO4HOT06InxTYwLnmJiyv2cZxReuoVjTlk--olGu-9MZooiFiqWez0JzndyKxQ27OiAjFsMh0P04kaUXeHKhXRfiU7K2FqBshR1UlnWe7iHLkq2p9rrGjxQc7ff0w-Uc0f-8PWg36Y2Od7s65493iVQwnI13egqMaSvgB1s8_dgm08noEjhr8C5m1aKmr5oipWEPNi-SBV2VNuiCLR1IEPuXq0tOwwZfv31t34KPO-2H2bbaWmzGJy9mMOGqoNrbXyGiUZoyeHRELaNtm1GilyQ")
val severJWK = SeverJWK()
//The common error or success format.
//Just some helper format to use in Json
case class NoSupportYet()

View File

@ -162,7 +162,7 @@ object NewStyle {
(nameOf(Implementations3_1_0.getProductCollection), ApiVersion.v3_1_0.toString),
(nameOf(Implementations3_1_0.createAccountAttribute), ApiVersion.v3_1_0.toString),
(nameOf(Implementations3_1_0.deleteBranch), ApiVersion.v3_1_0.toString),
(nameOf(Implementations3_1_0.getJWK), ApiVersion.v3_1_0.toString)
(nameOf(Implementations3_1_0.getServerJWK), ApiVersion.v3_1_0.toString)
)
object HttpCode {

View File

@ -3100,24 +3100,25 @@ trait APIMethods310 {
resourceDocs += ResourceDoc(
getJWK,
getServerJWK,
implementedInApiVersion,
"getJWK",
"getServerJWK",
"GET",
"/certs",
"Get JSON Web Key (JWK)",
"""Get JSON Web Key (JWK) at this instance
"""Get the server's public JSON Web Key (JWK) set and certificate chain.
| It is required by client applications to validate ID tokens, self-contained access tokens and other issued objects.
|
""".stripMargin,
emptyObjectJson,
emptyObjectJson,
severJWK,
List(
UnknownError
),
Catalogs(notCore, notPSD2, notOBWG),
List(apiTagApi))
lazy val getJWK: OBPEndpoint = {
lazy val getServerJWK: OBPEndpoint = {
case "certs" :: Nil JsonGet _ => {
cc =>
for {

View File

@ -335,7 +335,7 @@ object OBPAPI3_1_0 extends OBPRestHelper with APIMethods130 with APIMethods140 w
Implementations3_1_0.createMeeting ::
Implementations3_1_0.getMeetings ::
Implementations3_1_0.getMeeting ::
Implementations3_1_0.getJWK ::
Implementations3_1_0.getServerJWK ::
Nil
val allResourceDocs = Implementations3_1_0.resourceDocs ++