github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/api/uaa/internal/routes.go (about)

     1  package internal
     2  
     3  import (
     4  	"net/http"
     5  )
     6  
     7  const (
     8  	GetClientUser         = "GetClientUser"
     9  	GetSSHPasscodeRequest = "GetSSHPasscode"
    10  	PostOAuthTokenRequest = "PostOAuthToken"
    11  	PostUserRequest       = "PostUser"
    12  	ListUsersRequest      = "ListUsers"
    13  	DeleteUserRequest     = "DeleteUser"
    14  	UpdatePasswordRequest = "UpdatePassword"
    15  	DeleteTokenRequest    = "DeleteToken"
    16  )
    17  
    18  // APIRoutes is a list of routes used by the router to construct request URLs.
    19  var APIRoutes = []Route{
    20  	{Path: "/Users", Method: http.MethodPost, Name: PostUserRequest, Resource: UAAResource},
    21  	{Path: "/Users", Method: http.MethodGet, Name: ListUsersRequest, Resource: UAAResource},
    22  	{Path: "/Users/:user_guid", Method: http.MethodDelete, Name: DeleteUserRequest, Resource: UAAResource},
    23  	{Path: "/Users/:user_guid/password", Method: http.MethodPut, Name: UpdatePasswordRequest, Resource: UAAResource},
    24  	{Path: "/oauth/authorize", Method: http.MethodGet, Name: GetSSHPasscodeRequest, Resource: UAAResource},
    25  	{Path: "/oauth/clients/:client_id", Method: http.MethodGet, Name: GetClientUser, Resource: UAAResource},
    26  	{Path: "/oauth/token", Method: http.MethodPost, Name: PostOAuthTokenRequest, Resource: AuthorizationResource},
    27  	{Path: "/oauth/token/revoke/:token_id", Method: http.MethodDelete, Name: DeleteTokenRequest, Resource: AuthorizationResource},
    28  }