Interface FiatService
-
public interface FiatService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description retrofit.client.ResponsecanCreate(java.lang.String userId, java.lang.String resourceType, java.lang.Object resource)Determine whether the user can create a resource.com.netflix.spinnaker.fiat.model.UserPermission.ViewgetUserPermission(java.lang.String userId)retrofit.client.ResponsehasAuthorization(java.lang.String userId, java.lang.String resourceType, java.lang.String resourceName, java.lang.String authorization)retrofit.client.ResponseloginUser(java.lang.String userId, java.lang.String ignored)retrofit.client.ResponseloginWithRoles(java.lang.String userId, java.util.Collection<java.lang.String> roles)Used specifically for logins that contain the users roles/groups.retrofit.client.ResponselogoutUser(java.lang.String userId)longsync()Use to update all users.longsync(java.util.List<java.lang.String> roles)Use to update a subset of users.
-
-
-
Method Detail
-
getUserPermission
@GET("/authorize/{userId}") com.netflix.spinnaker.fiat.model.UserPermission.View getUserPermission(@Path("userId") java.lang.String userId)- Parameters:
userId- The username of the user- Returns:
- The full UserPermission of the user.
-
hasAuthorization
@GET("/authorize/{userId}/{resourceType}/{resourceName}/{authorization}") retrofit.client.Response hasAuthorization(@Path("userId") java.lang.String userId, @Path("resourceType") java.lang.String resourceType, @Path("resourceName") java.lang.String resourceName, @Path("authorization") java.lang.String authorization)- Parameters:
userId- The username of the userresourceType- The resource type in question (application, account, etc.)resourceName- The name of the resourceauthorization- The authorization in question (read, write, etc)- Returns:
- True if the user has access to the specified resource.
-
canCreate
@POST("/authorize/{userId}/{resourceType}/create") retrofit.client.Response canCreate(@Path("userId") java.lang.String userId, @Path("resourceType") java.lang.String resourceType, @Body java.lang.Object resource)Determine whether the user can create a resource. Returns 200 if the user can, throws 404 otherwise- Parameters:
userId- The username of the userresourceType- The type of the resourceresource- The resource to check
-
sync
@POST("/roles/sync") long sync()Use to update all users.- Returns:
- The number of non-anonymous users synced.
-
sync
@POST("/roles/sync") long sync(@Body java.util.List<java.lang.String> roles)Use to update a subset of users. An empty list will update the anonymous/unrestricted user.- Parameters:
roles- Users with any role listed should be updated.- Returns:
- The number of non-anonymous users synced.
-
loginUser
@POST("/roles/{userId}") retrofit.client.Response loginUser(@Path("userId") java.lang.String userId, @Body java.lang.String ignored)- Parameters:
userId- The user being logged inignored- ignored.- Returns:
- ignored.
-
loginWithRoles
@PUT("/roles/{userId}") retrofit.client.Response loginWithRoles(@Path("userId") java.lang.String userId, @Body java.util.Collection<java.lang.String> roles)Used specifically for logins that contain the users roles/groups.- Parameters:
userId- The user being logged inroles- Collection of roles from the identity provider- Returns:
- ignored.
-
logoutUser
@DELETE("/roles/{userId}") retrofit.client.Response logoutUser(@Path("userId") java.lang.String userId)- Parameters:
userId- The user being logged out- Returns:
- ignored.
-
-