StackSync Authentication middleware for Swift