few-oyster-74399
06/17/2024, 6:05 AMchilly-king-10285
06/17/2024, 6:05 AMchilly-king-10285
06/17/2024, 6:05 AMgrant_type should be set to urn:ietf:params:oauth:grant-type:jwt-bearer and the assertion should be the JWT. The scope parameter is optional. Here is a sample request: bash POST /oauth2/token HTTP/1.1 Host: {project.slug}.<http://projects.oryapis.com|projects.oryapis.com> Content-Type: application/x-www-form-urlencoded grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer &scope=read &assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL215LWlzc3Vlci5jb20iLCJzdWIiOiJhbGljZUBleGFtcGxlLm9yZyIsImF1ZCI6IjcxNDZkZDBiLWYyNDMtNDNiYS04MTVjLTdhMDAyMTZiNDgyMyIsIm5iZiI6MTMwMDgxNTc4MCwiZXhwIjoxMzAwODE5MzgwfQ.Dpn7zYEhaWxi7CLxr1c8Db2zxOJDzpu5QTZgeM6me68aGt7jgpKujunfx2FBhhuKY2oJmIAhXJWXplGH2NnbCGxNzx17Y4CPGJE9jLC2ZxprvV_5Cdmx5GkGcFjpOXsgBSonhmsyKkxYhS3C-mq4u2Tx9Zi494G2EbDH0L2BSuWYi411qm4LrIHQRdiFP9v34VH-5hU005bvrlGJBA9W-Eom4krFYtC4_Zgc7XY2mcChBw0AYz3A1B0_7ui95iDR-33D5tBAGRn6iGgnVBeR1GmZX5y4jz7Nht2lbPQkrCyLsoPxn2ZQPqvbOUKxdgsrhkcs0UGND8GsDwDzISuuAw You can find more details about this in the [Ory documentation](https://www.ory.sh/docs/hydra/guides/jwt#exchanging-jwt-assertion-for-access-token). However, it's important to note that while this approach can be used for authentication, it does not manage sessions. If you want to learn how Ory supports JWTs to manage sessions, you can read the [Session management documentation](https://www.ory.sh/docs/kratos/session-management/overview) and the [Session to JWT documentation](https://www.ory.sh/docs/identities/session-to-jwt-cors).few-oyster-74399
06/17/2024, 6:06 AMfew-oyster-74399
06/17/2024, 6:06 AMchilly-king-10285
06/17/2024, 6:06 AMchilly-king-10285
06/17/2024, 6:07 AM