{"openapi":"3.1.0","info":{"title":"service-login","description":"Login Service 2.0 REST API.","version":"26.8.0"},"servers":[{"url":"/"}],"tags":[{"name":"authorization-controller","description":"OAuth authorization and context management endpoints"}],"paths":{"/oauth/user/token":{"post":{"tags":["user-token-controller"],"operationId":"getUserTokenDeprecated","parameters":[{"name":"context_type","in":"query","required":true,"schema":{"type":"string","enum":["publisher","buyer","demand","seat","mp-vendor"]}},{"name":"context_id","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"key","in":"query","required":true,"schema":{"type":"string"}},{"name":"secret","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TokenDto"}}}}}}},"/oauth/token":{"post":{"tags":["access-token-controller"],"operationId":"getAccessToken","parameters":[{"name":"grant_type","in":"query","required":true,"schema":{"type":"string","enum":["TRUSTED","SELF","AUTHORIZATION_CODE","REFRESH_TOKEN"]}},{"name":"client_id","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"client_secret","in":"query","required":false,"schema":{"type":"string"}},{"name":"user_id","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"context_id","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"context_type","in":"query","required":false,"schema":{"type":"string","enum":["publisher","buyer","demand","seat","mp-vendor"]}},{"name":"redirect_uri","in":"query","required":false,"schema":{"type":"string"}},{"name":"state","in":"query","required":false,"schema":{"type":"string"}},{"name":"code","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccessTokenDto"}}}}}}},"/oauth/context-authorization/auth0":{"post":{"tags":["authorization-controller"],"summary":"Authorize context with Auth0 token","description":"Validates Auth0 access token and creates a context-specific access token","operationId":"contextAuthorizationAuth0","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextAuthorizationAuth0"}}},"required":true},"responses":{"200":{"description":"Access token created successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccessTokenDto"}}}},"403":{"description":"User not authorized for the requested context","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccessTokenDto"}}}}}}},"/form/update-password":{"post":{"tags":["change-password-controller"],"operationId":"updatePasswordAction","parameters":[{"name":"username","in":"query","required":false,"schema":{"type":"string"}},{"name":"password","in":"query","required":false,"schema":{"type":"string"}},{"name":"current_password","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/form/new-user-forgot-password":{"post":{"tags":["Forgot Password controller"],"summary":"Endpoint is needed to sent initial reset password letter. It is used in User Management during user creation. Should be removed and replaced with forgot password call","operationId":"forgotPasswordNewUser","parameters":[{"name":"username","in":"query","required":false,"schema":{"type":"string"}},{"name":"Version is used in UMS 2.0","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"includeSetPwdLink","in":"query","required":false,"schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResetPasswordResponse"}}}}}}},"/form/login":{"post":{"tags":["authentication-controller"],"operationId":"authentication","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"},"redirect_uri":{"type":"string"},"state":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/form/forgot-password":{"post":{"tags":["Forgot Password controller"],"operationId":"resetPassword","parameters":[{"name":"username","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResetPasswordResponse"}}}}}}},"/form/change-password":{"post":{"tags":["change-password-controller"],"operationId":"changePasswordHandling","parameters":[{"name":"token","in":"query","required":false,"schema":{"type":"string"}},{"name":"password","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/contexts/authorize-check":{"post":{"tags":["authorization-controller"],"summary":"Checks if user is authorized for provided contexts by access token","description":"Returns all contexts provided in the request body that the user is authorized for. Request body format: [\"publisher/100\", \"buyer/1234\", ...]","operationId":"checkAuthorizedContexts","parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"access_token","in":"query","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}},"examples":{"Example Request":{"description":"Example Request","value":["publisher/100","buyer/44500","demand/7001"]}}}},"required":true},"responses":{"200":{"description":"List of authorized contexts","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContextDto"}}}}}}}},"/services/user/me":{"get":{"tags":["user-identification-controller"],"summary":"Get the current user's profile, time zone, currency and account by access token","description":"Resolves an access token to the authenticated user. The token is read from the 'access_token' query parameter, or from the 'Authorization: Bearer <token>' header when the parameter is not supplied. Returns the user's identity (id, username, first and last name, email, phone, fax, status, locale code, isInternalUser, multiContext), their 'timezone' and 'currency', and their 'account' (including 'account.dataProvider.id'), 'seat', 'network' and 'marketplaceVendor'. Use it to look up the caller's time zone, currency or data provider id, or to validate a token and find out who it belongs to. The response also contains personal data (names, email, phone) and password-history fields, so use only the fields you need.","operationId":"getUserInfoByToken","parameters":[{"name":"access_token","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserMeDto"}}}}}}},"/ping":{"get":{"tags":["ping-controller"],"operationId":"ping","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/oauth/user/token/auth0":{"get":{"tags":["user-token-controller"],"operationId":"userInfo","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Auth0TokenDto"}}}}}}},"/oauth/token/logout":{"get":{"tags":["access-token-controller"],"operationId":"tokenLogout","parameters":[{"name":"access_token","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/oauth/contexts":{"get":{"tags":["authorization-controller"],"summary":"Get contexts for authenticated user","description":"Retrieves all contexts available to the authenticated user for the given client","operationId":"getContexts","parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"top","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"List of user contexts","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContextDto"}}}}}}}},"/oauth/authorized-contexts":{"get":{"tags":["authorization-controller"],"summary":"Get authorized contexts by access token","description":"Retrieves all contexts authorized for the given client and access token","operationId":"findAllContexts","parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"access_token","in":"query","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"top","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"List of authorized contexts","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContextDto"}}}}}}}},"/contexts/types":{"get":{"tags":["authorization-controller"],"summary":"Get supported context types","description":"Retrieves all context types that the user is authorized to access for the given email","operationId":"getContextsTypes","parameters":[{"name":"email","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of supported context types","content":{"*/*":{"schema":{"type":"array","items":{"type":"string","enum":["publisher","buyer","demand","seat","mp-vendor"]}}}}},"401":{"description":"Access token is invalid or expired","content":{"*/*":{"schema":{"type":"array","items":{"type":"string","enum":["publisher","buyer","demand","seat","mp-vendor"]}}}}}}}},"/api/v1/users/password-expiration-list":{"get":{"tags":["user-password-expiration-controller"],"operationId":"passwordExpirationList","responses":{"200":{"description":"OK"}}}},"/cache/clear":{"delete":{"tags":["cache-controller"],"operationId":"clearCache","responses":{"200":{"description":"OK"}}}}},"components":{"schemas":{"TokenDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"token":{"type":"string"},"contextType":{"type":"string"},"expires":{"type":"integer","format":"int64"},"scope":{"type":"string"},"user":{"$ref":"#/components/schemas/UserDto"}}},"UserDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"label":{"type":"string"},"username":{"type":"string"},"email":{"type":"string"}}},"AccessTokenDto":{"type":"object","properties":{"access_token":{"type":"string"},"expires_in":{"type":"integer","format":"int64"},"scope":{"type":"string"},"user_id":{"type":"string"},"username":{"type":"string"},"email":{"type":"string"},"context_type":{"type":"string"},"token_type":{"type":"string"},"url_fragment":{"type":"string"},"state":{"type":"string"}}},"ContextAuthorizationAuth0":{"type":"object","properties":{"contextType":{"type":"string","enum":["publisher","buyer","demand","seat","mp-vendor"]},"contextId":{"type":"integer","format":"int64"},"clientId":{"type":"integer","format":"int64"}}},"ResetPasswordResponse":{"type":"object","properties":{"data":{"type":"string"}}},"ContextDto":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"}}},"AccountDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"label":{"type":"string"},"level":{"type":"integer","format":"int32"},"dataProvider":{"$ref":"#/components/schemas/DataProviderDto"}}},"CurrencyDto":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}}},"DataProviderDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"label":{"type":"string"}}},"MarketplaceVendorDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"label":{"type":"string"},"dataProvider":{"$ref":"#/components/schemas/DataProviderDto"}}},"NetworkDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"label":{"type":"string"}}},"SeatDto":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"assignedDsps":{"type":"array","items":{"type":"string"}},"dataProvider":{"$ref":"#/components/schemas/DataProviderDto"}}},"TimezoneDto":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"abbreviation":{"type":"string"},"offset":{"type":"string"}}},"UserMeDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"phone":{"type":"string"},"fax":{"type":"string"},"contextType":{"type":"string"},"account":{"$ref":"#/components/schemas/AccountDto"},"seat":{"$ref":"#/components/schemas/SeatDto"},"network":{"$ref":"#/components/schemas/NetworkDto"},"marketplaceVendor":{"$ref":"#/components/schemas/MarketplaceVendorDto"},"currency":{"$ref":"#/components/schemas/CurrencyDto"},"timezone":{"$ref":"#/components/schemas/TimezoneDto"},"localeCode":{"type":"string"},"status":{"type":"string"},"isInternalUser":{"type":"boolean"},"multiContext":{"type":"boolean"},"passwordHistory":{"type":"integer","format":"int64"},"passhashLastChanged":{"type":"string","format":"date-time"}}},"Auth0TokenDto":{"type":"object","properties":{"tokenValue":{"type":"string"}}}}}}