Beispiel #1
0
        private static string GetResourceUrl(AuthenticationScope scope, int?id = null)
        {
            switch (scope)
            {
            case AuthenticationScope.Tenant:
                return(TenantAdminUserAuthTicketUrl.CreateUserAuthTicketUrl(id).Url);

            case AuthenticationScope.Developer:
                return(DeveloperAdminUserAuthTicketUrl.CreateDeveloperUserAuthTicketUrl(id).Url);

            default:
                throw new NotImplementedException();
            }
        }
Beispiel #2
0
        private static string GetLogoutUrl(AuthTicket ticket)
        {
            switch (ticket.AuthenticationScope)
            {
            case AuthenticationScope.Tenant:
                return(TenantAdminUserAuthTicketUrl.DeleteUserAuthTicketUrl(ticket.RefreshToken).Url);

            case AuthenticationScope.Developer:
                return(DeveloperAdminUserAuthTicketUrl.DeleteUserAuthTicketUrl(ticket.RefreshToken).Url);

            default:
                throw new NotImplementedException();
            }
        }
Beispiel #3
0
        private static string GetResourceRefreshUrl(AuthTicket authTicket, int?id = null)
        {
            switch (authTicket.AuthenticationScope)
            {
            case AuthenticationScope.Tenant:
                return(TenantAdminUserAuthTicketUrl.RefreshAuthTicketUrl(id).Url);

            case AuthenticationScope.Developer:
                return(DeveloperAdminUserAuthTicketUrl.RefreshDeveloperAuthTicketUrl(id).Url);

            default:
                throw new NotImplementedException();
            }
        }