Skip to content

Why user_create_token does not return the token value ? #3

@phamour

Description

@phamour

Hi there,

As per the doc, the user_create_token of UserApi returns None since the response body is empty. In this case, one can only create tokens without the possibility to really use them programmatically.

However, the bare API of Gitea does return the token object in terms of {"id":1,"name":"mytoken","sha1":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","token_last_eight":"xxxxxxxx"} (docs here).

Does this behavior come from some specific consideration at a security level ? or it was just generated without custom tuning ?

Thanks a lot in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions