Commit Graph

36 Commits

Author SHA1 Message Date
Vladimír Gorej
7ac9a8f070 feat(auth): persist cookie based apiKey in document.cookie (#8689)
Refs #8683
2023-05-22 14:46:30 +02:00
Maciej Kowalski
8f63462f9e feat(oauth2): authActions.authPopup plugin accessible wrapper (#7699)
* enables win.open to be extensible by plugins

Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2022-03-10 14:44:46 -08:00
Dan Dumont
f23a9d6924 fix(auth): support pkce when using basic auth header (#7038)
* support pkce when using basic auth header

* test(auth): useBasicAuthenticationWithAccessCodeGrant + usePkceWithAuthorizationCodeGrant
2021-03-10 10:30:20 -08:00
Tim Lai
0a807d6237 fix(auth): support for oauth2 relative url (#6546)
* Handle relative urls for oauth authorization

The full URL is computed based on the current selected server
if a relative URL is used as authorizationUrl
or tokenUrl


Co-authored-by: Eliot Berriot <contact@eliotberriot.com>
2020-10-21 15:46:31 -07:00
Amir Bitaraf Haghighi
96aecc8860 feat: Preserve authorization on browser refresh and close/reopen (#5939)
* Add default configuration `preserveAuthorization`

* Add localStorage to auth plugin

* Add persistAuthorization unit tests

* Refactor persistAuthorization to use wrapped actions

* Upgrade unit tests to be compatible with jest

* Add persistAuthorization documentation


Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2020-09-11 14:05:37 -07:00
John
21f51494a2 fix: support variables in auth urls (#5913) 2020-06-10 14:45:02 -07:00
poveilleux
139592e353 feat: add PKCE support for OAuth2 Authorization Code flows (#5361)
* Add PKCE support.

* Fix tests

* Update oauth2.md

* Rename usePkce

* Fix the BrokenComponent error

* Update oauth2.md

* Remove isCode variable. Remove uuid4 dependency.

* Remove utils functions

* Import crypto

* Fix tests

* Fix the tests

* Cleanup

* Fix code_challenge generation

* Move code challenge and verifier to utils for mocks. Update tests.

* Mock the PKCE methods in the utils file properly.

* Add missing expect

* use target-method spies

* Add comments to explain test values.

* Get rid of jsrsasign.
2019-10-07 17:24:43 -07:00
dalbrx-forcam
937c8f6208 improvement: set X-Requested-With to prevent browser authentication dialog (via #4934) 2019-02-14 17:20:06 -06:00
kyle
a5568f9e16 improve: OAuth2 UI and test suite (via #5066)
* create `features` folder

* add base oauth2 server

* continue implementing OAuth tests

* WIP

* add password flow tests

* modify Password flow credential types

* remove query string credential type

* add test case for Authorization flow

* add specific Authorization value for Password flow test

* WIP

* fix linter issues
2018-12-07 20:54:29 +01:00
Scott O'Hara
054d450a45 fix: add client_id and client_secret to form when type is request-body (via #4213) 2018-09-28 20:40:38 -05:00
Martin Danielsson
85cf0dccac improve: include more error data from authorization call (via #4801)
* Additional fix of #4048, more error messages from authorization call
  Inspect the error and error_description properties of the response, if available
* Fixed linter errors
2018-08-08 14:03:36 -07:00
kyle
3efdf1223e fix: add additionalQueryStringParams to auth requests (#4419)
* tests: add failing unit tests

* fix: add additionalQueryStringParams to auth requests
2018-04-06 20:00:10 -07:00
Luka Žitnik
e2d8a4e396 Fix(auth): improper resolution of relative token urls (#4180)
* fix(auth): improper resolution of relative token urls

* revert cc58ba7 for OAS2

In OAS2, relative token URLs are resolved against the host that serves the specs.
2018-04-05 19:20:20 -07:00
Kyle Shockey
2325118540 Add responseInterceptor as well 2017-11-29 15:55:15 -06:00
Kyle Shockey
ade47ca40e Add requestInterceptor to OAuth2 request authorization calls 2017-11-29 15:54:17 -06:00
Jeremy Epstein
a5193a5b5b Don't URI-encode scopes when posting in oauth2 password flow 2017-10-29 12:04:43 +11:00
Aaron Loo
700d547529 merge master 2017-08-03 07:32:32 -07:00
Kyle
b329b03464 Merge branch 'master' into support-basic-auth-for-authorization-code-grant 2017-08-01 16:52:04 -07:00
Aaron Loo
860d356178 remove CORS header in request 2017-07-28 10:15:05 -07:00
TANAKA Koichi
0bc382b78a Fix oauth2 password flow
fix filed name for scope of grant request body.
2017-07-18 16:52:29 +09:00
Eric Turcotte
badfea61c3 Renamed authorizeAccessCodeWithQueryParams->authorizeAccessCodeWithFormParams
since that is technically correct
2017-07-13 10:53:36 -05:00
Eric Turcotte
fc8ad8168d Renamed authorizeAccessCode() to authorizeAccessCodeWithQueryParams()
Added authorizeAccessCodeWithBasicAuthentication() that sends the client_id and
client_secret using HTTP basic authentication

    Authorization: Basic base64encoded[client_id:client_secret]

According to the OAuth2 spec, this is the preferred method.  It also enables
Authorization Servers that only support basic authentication during the
authorization_code grant.

https://tools.ietf.org/html/rfc6749#section-2.3.1
2017-07-12 23:32:29 -05:00
Anna Bodnia
bbf93c5e1f #3172 added Access-Control-Allow-Origin for auth requests 2017-06-08 14:06:30 +03:00
Anna Bodnia
36b263e230 fixes #3172 2017-06-08 12:19:47 +03:00
Anna Bodnia
5f2eaffbc3 fix #3128 2017-05-31 17:31:29 +03:00
Furkan Ayhan
0c7119e855 Send redirect url when authenticating with oauth2-authorization_code
also fix indentations of files
2017-05-16 16:50:13 +03:00
Anna Bodnia
8aebea34c4 add configuration of auth: scope separator, client id, client secret, app name, reaml, additionalQueryParams 2017-05-11 16:30:30 +03:00
Anna Bodnia
374ac9cbbb fix #2870 2017-04-27 20:09:05 +03:00
Anna Bodnia
87a23c7c9e fix eslint errors 2017-04-27 19:01:27 +03:00
Anna Bodnia
d013e7a05c #2844 fix accessCode flow 2017-04-27 18:55:25 +03:00
Anna Bodnia
bb73dd49d8 fixes password, application oauth2 flows 2017-04-26 17:50:09 +03:00
Mészáros Mihály
81abe37a31 add fn.fetch instead of native fetch 2017-04-06 14:46:04 +02:00
Mészáros Mihály
4066d1920e move out the code according @bodnia guide 2017-04-06 13:12:28 +02:00
Anna Bodnia
59ecaf40ee fix #2456 2017-04-04 16:09:28 +03:00
Anna Bodnia
432cd7f965 #2774 display scopes for oauth2 password flow 2017-03-30 17:49:32 +03:00
Ron
f22a628934 in with the new 2017-03-17 21:17:53 -07:00