Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API endpoint /credentials #8

Open
6 tasks done
mjstealey opened this issue Jun 20, 2022 · 0 comments
Open
6 tasks done

API endpoint /credentials #8

mjstealey opened this issue Jun 20, 2022 · 0 comments

Comments

@mjstealey
Copy link
Member

mjstealey commented Jun 20, 2022

/credentials

Endpoints

  • /credentials paginated
  • /credentials/{int:pk}

Functions

  • search - by user_id as user.id == user_id or operator
  • get one - by user_id as credential owner or operator
  • create - as self - generate new key if public_key_credential not provided and return public / private portions
  • delete - as self or as operator

Fields

--- /credentials
public_key_credential:  - string
public_key_expiration:  - string
public_key_id:          - int
public_key_name:        - string
user_id:                - int
--- /credentials/{int:pk}
created_date            - string
is_deleted              - boolean
is_expired:             - boolean
last_modified_by        - int
modified_date           - string
public_key_credential   - string
public_key_expiration   - int
public_key_id           - int
public_key_name         - string
user_id                 - int

Notes

POST

  • when public_key_credential is included the value will be saved to the database and the response will include the normal detailed information
  • when public_key_credential is NOT included a new key will be generated and the response will include the normal detailed information along with a one-time view of the private_key_credential
{
    "public_key_credential": "ssh-rsa AAAA...",   <-- optional
    "public_key_name": "user defined key name"    <-- required
}
mjstealey added a commit that referenced this issue Jul 25, 2022
mjstealey added a commit that referenced this issue Aug 11, 2022
mjstealey added a commit that referenced this issue Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant