| 792 | #undef LONGOPT_OPTION_CAST |
| 793 | |
| 794 | void |
| 795 | TSPluginInit(int argc, const char *argv[]) |
| 796 | { |
| 797 | TSPluginRegistrationInfo info; |
| 798 | |
| 799 | info.plugin_name = (char *)"authproxy"; |
| 800 | info.vendor_name = (char *)"Apache Software Foundation"; |
| 801 | info.support_email = (char *)"dev@trafficserver.apache.org"; |
| 802 | |
| 803 | if (TSPluginRegister(&info) != TS_SUCCESS) { |
| 804 | AuthLogError("plugin registration failed"); |
| 805 | } |
| 806 | |
| 807 | TSReleaseAssert(TSUserArgIndexReserve(TS_USER_ARGS_TXN, "AuthProxy", "AuthProxy authorization tag", &AuthTaggedRequestArg) == |
| 808 | TS_SUCCESS); |
| 809 | |
| 810 | AuthOsDnsContinuation = TSContCreate(AuthProxyGlobalHook, nullptr); |
| 811 | AuthGlobalOptions = AuthParseOptions(argc, argv); |
| 812 | AuthLogDebug("using authorization proxy at %s:%d", AuthGlobalOptions->hostname.c_str(), AuthGlobalOptions->hostport); |
| 813 | |
| 814 | // Use the appropriate hook for consistent auth checks. |
| 815 | TSHttpHookAdd(TS_HTTP_POST_REMAP_HOOK, AuthOsDnsContinuation); |
| 816 | } |
| 817 | |
| 818 | TSReturnCode |
| 819 | TSRemapInit(TSRemapInterface * /* api ATS_UNUSED */, char * /* err ATS_UNUSED */, int /* errsz ATS_UNUSED */) |
nothing calls this directly
no test coverage detected