AuthApi

Functions

Link copied to clipboard
@POST(value = "api/auth/token")
abstract suspend fun createAccessToken(@Query(value = "projectIds") projectIds: @JvmSuppressWildcards Set<String>? = null, @Query(value = "permissions") permissions: @JvmSuppressWildcards Set<String>? = null, @Query(value = "expiresInHours") expiresInHours: Float? = 2.0f): String

Create a new access token Create a new short-lived access token, optionally limited to the provided permissions and projects. Users do not need any specific Develocity permission to do this. If an access key is used to authenticate this request, the created token will be limited to the user's permissions and projects. If an access token is used to authenticate this request, the created token will be limited to the authenticating token's permissions and projects and not live longer than the authenticating token's remaining lifetime. Query parameters can be used to further restrict the permissions of the access token. A 403 response will be sent if one of the projects or permissions present in the query parameters is not assigned to this user. A 403 will also be sent if an access token is used to authenticate the request and the requested expiration date is after the authenticating access token's expiration. Responses:

Link copied to clipboard
@POST(value = "api/auth/revoke-signing-keys")
abstract suspend fun revokeSigningKeys()

Revoke auth token signing keys Revokes the existing auth token signing keys, and creates a new one. Requires the `Administer Develocity` permission. All existing access tokens will become invalid. Develocity may take a few minutes to revoke all existing access tokens. Responses: