# Invalidate Cupertino session during its life

**URL:** https://community.wowza.com/t/invalidate-cupertino-session-during-its-life/37832
**Category:** Wowza Developer Dojo
**Tags:** wowza-streaming-server-java-api
**Created:** [February 13, 2016, 1:55pm UTC](https://community.wowza.com/t/invalidate-cupertino-session-during-its-life/37832 "2016-02-13T13:55:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Jivko\_Todorov](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@Jivko\_Todorov](https://community.wowza.com/u/Jivko_Todorov)
#### Post date: [February 13, 2016, 1:55pm UTC](https://community.wowza.com/t/invalidate-cupertino-session-during-its-life/37832/1 "2016-02-13T13:55:45Z")

</div>

I created livestream app which is using wowza as streaming server, and create own wowza security module.

Until now i override ModuleBase.onHTTPCupertinoStreamingSessionCreate and ModuleBase.onHTTPCupertinoStreamingSessionDestroy which allow to reject/accept Cupertino session according … in my case token(passed as url param).

Everything works fine.

But sometimes i need to reject same session(previously accepted) during its life. With other words during play sometimes I need to invalidate token

The problem is that onHTTPCupertinoStreamingSessionCreate is called only once at the beginning of session.

I’m not sure which class should i override in order to invalidate sessions during its life. Maybe HTTPStreamerAdapterCupertinoStreamer or specially onPlaylist or onMediaFile methods

---

<div class="post-metadata">

### Author: ![Matt\_Young](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/matt_young/32/389_2.png) [@Matt\_Young](https://community.wowza.com/u/Matt_Young)
#### Post date: [March 10, 2016, 9:36am UTC](https://community.wowza.com/t/invalidate-cupertino-session-during-its-life/37832/2 "2016-03-10T09:36:00Z")

</div>

Hello

To have mid-life access to the http session, take a look at our following method signatures available to you:

```auto
       public void onHTTPStreamerRequest(IHTTPStreamerSession httpSession, IHTTPStreamerRequestContext reqContext)
       public void onHTTPCupertinoStreamerRequest(HTTPStreamerSessionCupertino httpSession, HTTPStreamerCupertinoRequestContext reqContext)
       public void onHTTPSanJoseStreamerRequest(HTTPStreamerSessionSanJose httpSession, HTTPStreamerSanJoseRequestContext reqContext)
       public void onHTTPSmoothStreamingStreamerRequest(HTTPStreamerSessionSmoothStreamer httpSession, HTTPStreamerSmoothStreamingRequestContext reqContext)
       public void onHTTPMPEGDashStreamerRequest(HTTPStreamerSessionMPEGDash httpSession, HTTPStreamerMPEGDashRequestContext reqContext)

```

The above are invoked (as protocol specifies) for each request (chunk or playlist etc). The generic handler (onHTTPStreamerRequest) will be for _all_ http protocols.

Thanks,

Matt
