| GET | /auth/status |
|---|
import Foundation
import ServiceStack
/**
* Gets the current authenticated status or null
*/
// @Api(Description="Gets the current authenticated status or null")
public class GetAuthStatus : IGet, Codable
{
required public init(){}
}
public class UserInfo : Codable
{
public var id:String
public var isAuthenticated:Bool
public var firstName:String
public var lastName:String
public var name:String
public var avatarUrl:String
public var emailAddress:String
public var roles:[String]
public var accountIds:[String]
public var accountNames:[String]
public var managerAccess:UserManagerAccess
public var dashboardPermissions:[DashboardPermissions]
required public init(){}
}
public enum UserManagerAccess : String, Codable
{
case ReadOnly
case ReadWrite
case ReadWriteDelete
}
public enum DashboardPermissions : String, Codable
{
case ViewFiles
case ViewNotifications
case ViewSessions
case ViewEndpoints
case ViewReports
case ViewCustomers
case ViewFlows
case ViewCallCenter
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /auth/status HTTP/1.1 Host: evovoice.io Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
id: String,
isAuthenticated: False,
firstName: String,
lastName: String,
name: String,
avatarUrl: String,
emailAddress: String,
roles:
[
String
],
accountIds:
[
String
],
accountNames:
[
String
],
managerAccess: ReadOnly,
dashboardPermissions:
[
ViewFiles
]
}