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 dashboardPermissions:[DashboardPermissions]
required public init(){}
}
public enum DashboardPermissions : String, Codable
{
case ViewFiles
case ViewNotifications
case ViewSessions
case ViewEndpoints
case ViewReports
case ViewCustomers
case ViewFlows
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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: team.evovoice.io Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"id":"String","isAuthenticated":false,"firstName":"String","lastName":"String","name":"String","avatarUrl":"String","emailAddress":"String","roles":["String"],"accountIds":["String"],"accountNames":["String"],"dashboardPermissions":["ViewFiles"]}