X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e2ed71e15de22c629b5b5e174aa351cce03ee381..2094173f347a22f32e8da4590bb6594dad5d7ebd:/sdk/go/arvados/api.go diff --git a/sdk/go/arvados/api.go b/sdk/go/arvados/api.go index f3fdd254ff..5a2cfb8800 100644 --- a/sdk/go/arvados/api.go +++ b/sdk/go/arvados/api.go @@ -55,7 +55,8 @@ var ( EndpointUserUnsetup = APIEndpoint{"POST", "arvados/v1/users/{uuid}/unsetup", ""} EndpointUserUpdate = APIEndpoint{"PATCH", "arvados/v1/users/{uuid}", "user"} EndpointUserUpdateUUID = APIEndpoint{"POST", "arvados/v1/users/{uuid}/update_uuid", ""} - EndpointUserBatchUpdate = APIEndpoint{"PATCH", "arvados/v1/users/batch", ""} + EndpointUserBatchUpdate = APIEndpoint{"PATCH", "arvados/v1/users/batch_update", ""} + EndpointUserAuthenticate = APIEndpoint{"POST", "arvados/v1/users/authenticate", ""} EndpointAPIClientAuthorizationCurrent = APIEndpoint{"GET", "arvados/v1/api_client_authorizations/current", ""} ) @@ -84,7 +85,8 @@ type ListOptions struct { Count string `json:"count"` IncludeTrash bool `json:"include_trash"` IncludeOldVersions bool `json:"include_old_versions"` - NoFederation bool `json:"no_federation"` + BypassFederation bool `json:"bypass_federation"` + ForwardedFor string `json:"forwarded_for,omitempty"` } type CreateOptions struct { @@ -95,9 +97,9 @@ type CreateOptions struct { } type UpdateOptions struct { - UUID string `json:"uuid"` - Attrs map[string]interface{} `json:"attrs"` - NoFederation bool `json:"no_federation"` + UUID string `json:"uuid"` + Attrs map[string]interface{} `json:"attrs"` + BypassFederation bool `json:"bypass_federation"` } type UpdateUUIDOptions struct { @@ -144,6 +146,11 @@ type LoginOptions struct { State string `json:"state,omitempty"` // OAuth2 callback state } +type UserAuthenticateOptions struct { + Username string `json:"username,omitempty"` // PAM username + Password string `json:"password,omitempty"` // PAM password +} + type LogoutOptions struct { ReturnTo string `json:"return_to"` // Redirect to this URL after logging out } @@ -186,5 +193,6 @@ type API interface { UserList(ctx context.Context, options ListOptions) (UserList, error) UserDelete(ctx context.Context, options DeleteOptions) (User, error) UserBatchUpdate(context.Context, UserBatchUpdateOptions) (UserList, error) + UserAuthenticate(ctx context.Context, options UserAuthenticateOptions) (APIClientAuthorization, error) APIClientAuthorizationCurrent(ctx context.Context, options GetOptions) (APIClientAuthorization, error) }