# Auth

Authentication and authorization related endpoints.


## Takes a user ID and returns a temporary token that can be exchanged for a real auth token.

 - [POST /auth/exchange-token](https://docs.peachfinance.com/api-docs/api-public/auth/peach.security.handlers.exchange_token_create.md)

## Change password

 - [POST /auth/password](https://docs.peachfinance.com/api-docs/api-public/auth/peach.security.handlers.password_post.md)

## Get all permissions for the requesting user

 - [GET /auth/permissions](https://docs.peachfinance.com/api-docs/api-public/auth/peach.security.handlers.permissions_get.md)

## End login session, invalidating current login token.

 - [DELETE /auth/token](https://docs.peachfinance.com/api-docs/api-public/auth/peach.security.handlers.logout.md)

## Exchange username and password for JWT token

 - [POST /auth/token](https://docs.peachfinance.com/api-docs/api-public/auth/peach.security.handlers.validate_and_send_token.md)

## Exchange current token for a new one

 - [PUT /auth/token](https://docs.peachfinance.com/api-docs/api-public/auth/peach.security.handlers.renew_jwt_token.md)

## Create a short-lived token

 - [POST /auth/token/short-lived](https://docs.peachfinance.com/api-docs/api-public/auth/peach.security.handlers.short_lived_token.md)

## Get logged-in user's info.

 - [GET /auth/user](https://docs.peachfinance.com/api-docs/api-public/auth/peach.security.handlers.user_info_get.md)

## SAML callback endpoint

 - [POST /companies/{companyId}/auth/saml/callback](https://docs.peachfinance.com/api-docs/api-public/auth/peach.security.handlers.saml_sp_auth.idp_initiated.md)

## Display IdP setup help

 - [GET /companies/{companyId}/auth/saml/help](https://docs.peachfinance.com/api-docs/api-public/auth/peach.security.handlers.saml_sp_auth.idp_setup_help.md)

## Redirect to the SAML login endpoint

 - [GET /companies/{companyId}/auth/saml/login](https://docs.peachfinance.com/api-docs/api-public/auth/peach.security.handlers.saml_sp_auth.sp_initiated.md)

## Display Peach SP Metadata

 - [GET /companies/{companyId}/auth/saml/metadata.xml](https://docs.peachfinance.com/api-docs/api-public/auth/peach.security.handlers.saml_sp_auth.sp_metadata_xml.md): Peach acts as the service provider

## Send one time code.

 - [POST /companies/{companyId}/auth/send-one-time-code](https://docs.peachfinance.com/api-docs/api-public/auth/peach.security.handlers.send_one_time_code.md): Send a one time code to a phone number or email address. For phone numbers, the code
can be sent via text or voice.

## End login session, invalidating current login token.

 - [DELETE /compliance/auth/token](https://docs.peachfinance.com/api-docs/api-public/auth/peach.security.handlers.compliance_logout.md)

## Exchange username and password for JWT token

 - [POST /compliance/auth/token](https://docs.peachfinance.com/api-docs/api-public/auth/peach.security.handlers.compliance_validate_and_send_token.md)

## Exchange current token for a new one

 - [PUT /compliance/auth/token](https://docs.peachfinance.com/api-docs/api-public/auth/peach.security.handlers.compliance_renew_jwt_token.md)

## Replace user's auth based on configured company auth type

 - [PUT /users/{userId}/auth](https://docs.peachfinance.com/api-docs/api-public/auth/peach.security.handlers.user_auth_replace.md): Replace the user's authentication values from scratch. The
authentication type is derived from the company config.

