APIToken string `json:"api_token"`
CreatedAt time.Time `json:"created_at"`
CreatedByIPAddress string `json:"created_by_ip_address"`
- DefaultOwnerUUID string `json:"default_owner_uuid"`
Etag string `json:"etag"`
ExpiresAt time.Time `json:"expires_at"`
LastUsedAt time.Time `json:"last_used_at"`
private Object prefs;
@JsonProperty("writable_by")
private List<String> writableBy;
- @JsonProperty("default_owner_uuid")
- private Boolean defaultOwnerUuid;
public String getEmail() {
return this.email;
return this.writableBy;
}
- public Boolean getDefaultOwnerUuid() {
- return this.defaultOwnerUuid;
- }
-
public void setEmail(String email) {
this.email = email;
}
this.writableBy = writableBy;
}
- public void setDefaultOwnerUuid(Boolean defaultOwnerUuid) {
- this.defaultOwnerUuid = defaultOwnerUuid;
- }
-
public String toString() {
- return "User(email=" + this.getEmail() + ", username=" + this.getUsername() + ", fullName=" + this.getFullName() + ", firstName=" + this.getFirstName() + ", lastName=" + this.getLastName() + ", identityUrl=" + this.getIdentityUrl() + ", isActive=" + this.getIsActive() + ", isAdmin=" + this.getIsAdmin() + ", isInvited=" + this.getIsInvited() + ", prefs=" + this.getPrefs() + ", writableBy=" + this.getWritableBy() + ", defaultOwnerUuid=" + this.getDefaultOwnerUuid() + ")";
+ return "User(email=" + this.getEmail() + ", username=" + this.getUsername() + ", fullName=" + this.getFullName() + ", firstName=" + this.getFirstName() + ", lastName=" + this.getLastName() + ", identityUrl=" + this.getIdentityUrl() + ", isActive=" + this.getIsActive() + ", isAdmin=" + this.getIsAdmin() + ", isInvited=" + this.getIsInvited() + ", prefs=" + this.getPrefs() + ", writableBy=" + this.getWritableBy() + ")";
}
}
createdAt: string;
updatedAt: string;
ownerUuid: string;
- defaultOwnerUuid: string;
scopes: string[];
}
export const getTokenV2 = (aca: ApiClientAuthorization): string =>
- `v2/${aca.uuid}/${aca.apiToken}`;
\ No newline at end of file
+ `v2/${aca.uuid}/${aca.apiToken}`;
export interface UserResource extends Resource, User {
kind: ResourceKind.USER;
- defaultOwnerUuid: string;
}
enum ApiClientAuthorizationsData {
API_CLIENT_AUTHORIZATION = 'api_client_authorization',
- DEFAULT_OWNER_UUID = 'default_owner_uuid'
+ EXPIRES_AT = 'expires_at'
}
enum LinkData {
data: dataApiClientAuthorization,
resourceKind: ApiClientAuthorizationsData.API_CLIENT_AUTHORIZATION,
resourcePrefix: ResourcePrefix.API_CLIENT_AUTHORIZATIONS,
- resourceKindProperty: ApiClientAuthorizationsData.DEFAULT_OWNER_UUID,
- property: dataApiClientAuthorization!.defaultOwnerUuid
+ resourceKindProperty: ApiClientAuthorizationsData.EXPIRES_AT,
+ property: dataApiClientAuthorization!.createdAt
});
dispatch<any>(initAdvancedTabDialog(advanceDataApiClientAuthorization));
break;
const userApiResponse = (apiResponse: UserResource): JSX.Element => {
const {
uuid, ownerUuid, createdAt, modifiedAt, modifiedByClientUuid, modifiedByUserUuid,
- email, firstName, lastName, username, isActive, isAdmin, prefs, defaultOwnerUuid,
+ email, firstName, lastName, username, isActive, isAdmin, prefs,
} = apiResponse;
const response = `
"uuid": "${uuid}",
"is_active": "${isActive},
"is_admin": "${isAdmin},
"prefs": "${stringifyObject(prefs)},
-"default_owner_uuid": "${defaultOwnerUuid},
"username": "${username}"`;
return <span style={{ marginLeft: '-15px' }}>{'{'} {response} {'\n'} <span style={{ marginLeft: '-15px' }}>{'}'}</span></span>;
const apiClientAuthorizationApiResponse = (apiResponse: ApiClientAuthorization): JSX.Element => {
const {
uuid, ownerUuid, apiToken, apiClientId, userId, createdByIpAddress, lastUsedByIpAddress,
- lastUsedAt, expiresAt, defaultOwnerUuid, scopes, updatedAt, createdAt
+ lastUsedAt, expiresAt, scopes, updatedAt, createdAt
} = apiResponse;
const response = `
"uuid": "${uuid}",
"expires_at": "${stringify(expiresAt)}",
"created_at": "${stringify(createdAt)}",
"updated_at": "${stringify(updatedAt)}",
-"default_owner_uuid": "${stringify(defaultOwnerUuid)}",
"scopes": "${JSON.stringify(scopes, null, 2)}"`;
return <span style={{ marginLeft: '-15px' }}>{'{'} {response} {'\n'} <span style={{ marginLeft: '-15px' }}>{'}'}</span></span>;
<Grid item xs={7}>{data.apiClientAuthorization.apiToken}</Grid>
<Grid item xs={5}>Created by IP address</Grid>
<Grid item xs={7}>{data.apiClientAuthorization.createdByIpAddress || '(none)'}</Grid>
- <Grid item xs={5}>Default owner</Grid>
- <Grid item xs={7}>{data.apiClientAuthorization.defaultOwnerUuid || '(none)'}</Grid>
<Grid item xs={5}>Expires at</Grid>
<Grid item xs={7}>{formatDate(data.apiClientAuthorization.expiresAt) || '(none)'}</Grid>
<Grid item xs={5}>Last used at</Grid>
</Button>
</DialogActions>
</Dialog>
- );
\ No newline at end of file
+ );
export const TokenCreatedByIpAddress = withResourceData("createdByIpAddress", renderCommonDate);
-export const TokenDefaultOwnerUuid = withResourceData("defaultOwnerUuid", renderCommonData);
-
export const TokenExpiresAt = withResourceData("expiresAt", renderCommonDate);
export const TokenLastUsedAt = withResourceData("lastUsedAt", renderCommonDate);
import { DataExplorer } from 'views-components/data-explorer/data-explorer';
import { ResourcesState } from 'store/resources/resources';
import {
- CommonUuid, TokenApiClientId, TokenApiToken, TokenCreatedByIpAddress, TokenDefaultOwnerUuid, TokenExpiresAt,
+ CommonUuid, TokenApiClientId, TokenApiToken, TokenCreatedByIpAddress, TokenExpiresAt,
TokenLastUsedAt, TokenLastUsedByIpAddress, TokenScopes, TokenUserId
} from 'views-components/data-explorer/renderers';
import { ApiClientAuthorization } from 'models/api-client-authorization';
API_CLIENT_ID = 'API Client ID',
API_TOKEN = 'API Token',
CREATED_BY_IP_ADDRESS = 'Created by IP address',
- DEFAULT_OWNER_UUID = 'Default owner',
EXPIRES_AT = 'Expires at',
LAST_USED_AT = 'Last used at',
LAST_USED_BY_IP_ADDRESS = 'Last used by IP address',
filters: createTree(),
render: uuid => <TokenCreatedByIpAddress uuid={uuid} />
},
- {
- name: ApiClientAuthorizationPanelColumnNames.DEFAULT_OWNER_UUID,
- selected: true,
- configurable: true,
- filters: createTree(),
- render: uuid => <TokenDefaultOwnerUuid uuid={uuid} />
- },
{
name: ApiClientAuthorizationPanelColumnNames.EXPIRES_AT,
selected: true,