# Class OAuthCalendarSource

java.lang.Object
com.codename1.calendar.CalendarSource
com.codename1.calendar.OAuthCalendarSource

Direct Known Subclasses:
  `GoogleCalendarSource, MicrosoftCalendarSource`

public abstract class OAuthCalendarSource extends CalendarSource
Shared authenticated HTTP behavior for online calendar sources. Tokens and credentials remain app-owned; the source only asks for a token when needed.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `OAuthCalendarSource(String id, String displayName, CalendarTokenProvider tokenProvider, CalendarHttpTransport transport, String[] scopes)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CalendarAuthorizationStatus`
  `getAuthorizationStatus(CalendarAccess access)`
  `protected final AsyncResource<Map<String,Object>>`
  `json(String method, String url, Map<String,Object> body, Map<String,String> headers)`
  `protected final AsyncResource<CalendarHttpResponse>`
  `raw(String method, String url, String body, String contentType, Map<String,String> headers)`
  `AsyncResource<CalendarAuthorizationStatus>`
  `requestAuthorization(CalendarAccess access)`

  ### Methods inherited from class CalendarSource

  `addChangeListener, completed, deleteCalendar, deleteCalendar, deleteEvent, deleteTask, fireChange, getCapabilities, getDisplayName, getEvent, getId, getTask, isAvailable, listCalendars, queryEvents, queryFreeBusy, queryTasks, removeChangeListener, respondToEvent, saveCalendar, saveEvent, saveTask, unavailable, unsupported`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### OAuthCalendarSource

    protected OAuthCalendarSource(String id, String displayName, CalendarTokenProvider tokenProvider, CalendarHttpTransport transport, String[] scopes)

- ## Method Details

  - ### getAuthorizationStatus

    public CalendarAuthorizationStatus getAuthorizationStatus(CalendarAccess access)
    Overrides:
      `getAuthorizationStatus` in class `CalendarSource`

  - ### requestAuthorization

    public AsyncResource<CalendarAuthorizationStatus> requestAuthorization(CalendarAccess access)
    Overrides:
      `requestAuthorization` in class `CalendarSource`

  - ### json

    protected final AsyncResource<Map<String,Object>> json(String method, String url, Map<String,Object> body, Map<String,String> headers)

  - ### raw

    protected final AsyncResource<CalendarHttpResponse> raw(String method, String url, String body, String contentType, Map<String,String> headers)