Skip to content

Commit

Permalink
[PLATFORM-3432] Update fork with upstream (v1.1.3) (#7)
Browse files Browse the repository at this point in the history
* set lifetime on creation

* cleanup docs

* allow loginSync response to set values in state

* loginSync sets extra props in state

* cookie test

* more cookie tests

* upgrade packages and cookie test

* comment

* ignore new output from playwright

* 1.1 fix lougout, pass through client_id, redirect_id

* 1.1.0

* fix docker command for v27

* only check if client_id was set earlier

* docs update

* 1.1.1

* fix setting client_id

* 1.1.2

* use target_uri rather than redirect_uri

* 1.1.3

* add puml sequence diagrams

* chore: Pin node engine version

---------

Co-authored-by: Dick Hardt <[email protected]>
  • Loading branch information
Evanjt1 and dickhardt authored Jul 17, 2024
1 parent 856efa5 commit 44301f5
Show file tree
Hide file tree
Showing 14 changed files with 765 additions and 366 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
.vscode
node_modules
/dist
playwright-report
playwright-report
/test-results
33 changes: 25 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# AS4Mobile
# client_as

Authorization Server for Mobile Apps

## Environment Configuration
Expand Down Expand Up @@ -56,6 +57,7 @@ User is logged in. access_token and refresh_token cookies have been created and

After the user has successfully logged in, call

```
POST /token HTTP/1.1
Host: app.tiltingpoint.com
Content-Type: application/x-www-form-urlencoded
Expand All @@ -64,14 +66,20 @@ DPoP: zzzzz
grant_type=authorization_code&
client_id=SDK-1.0.0
code=<nonce>
```

will return
```
{
"access_token": "xxx",
"token_type": "DPoP",
"refresh_token": "yyy",
"expires_in": 300
}
```
Refreshing an access token

```
POST /token HTTP/1.1
Host: app.tiltingpoint.com
Content-Type: application/x-www-form-urlencoded
Expand All @@ -80,24 +88,33 @@ DPoP: zzzzz
Refresh
grant_type=refresh_token&
refresh_token=yyy
```

## Endpoints

Endpoints

/token // public
### /token // public

grant_type="cookie_token"
device_info ???

/jwks
### /jwks

/revoke
### /revoke

/.wellknown/oauth-authorization-server
### /.wellknown/oauth-authorization-server

/login
### /login
- called by client after successful login




## Development

- clone repo
- `npm i` to install all node modules
- `npx playwright install` to install Playwright binaries to test with

`npm test` will run fastify.inject() tests

`npm run playwright` will start all the services with docker compose and then run the Playwright tests for browser interactions
Loading

0 comments on commit 44301f5

Please sign in to comment.